cl-mcp: Command for Claude Code

.claude/commands/common-lisp/add-blank-lines.md

add-blank-lines is a command for Claude Code from cl-ai-project/cl-mcp. It costs 19 tokens per session (1,278 once invoked), scanned A, original, MIT.

A Common Lisp formatting command that adds missing blank lines between top-level definitions, following Google's Common Lisp style guidance. It skips several related forms and known exception cases.

In plain words
What is it for?
Use it to find and fix spacing between top-level forms in .lisp and .asd files, usually under the src directory, then review and report the changes.
Why use it?
It makes Lisp source easier to scan while avoiding unnecessary changes inside grouped declarations, package forms, or likely false matches.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is cl-ai-project/cl-mcp's own configuration. It tells Claude Code how to work on cl-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cl-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cl-ai-project/cl-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cl-ai-project/cl-mcp/main/.claude/commands/common-lisp/add-blank-lines.md
Clone the repo
git clone --depth 1 https://github.com/cl-ai-project/cl-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-blank-lines

README.md
[![agentmods](https://agentmods.dev/badge/commands/cl-ai-project/cl-mcp/add-blank-lines/github.svg)](https://agentmods.dev/commands/cl-ai-project/cl-mcp/add-blank-lines)
Your own site
<a href="https://agentmods.dev/commands/cl-ai-project/cl-mcp/add-blank-lines"><img src="https://agentmods.dev/badge/commands/cl-ai-project/cl-mcp/add-blank-lines/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-blank-lines

Your own site · 80×15
<a href="https://agentmods.dev/commands/cl-ai-project/cl-mcp/add-blank-lines"><img src="https://agentmods.dev/badge/commands/cl-ai-project/cl-mcp/add-blank-lines.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,278 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.01278
Opus 5 $0.00010 $0.00639
Sonnet 5 $0.00004 $0.00256
Haiku 4.5 $0.00002 $0.00128

Measured 10d ago against content hash 197ac959c967, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

add-blank-lines scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/common-lisp/add-blank-lines.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

トップレベルフォーム間の空行追加

Common Lispファイルのトップレベルフォーム間に空行を追加し、Google Common Lisp Style Guideに準拠させる。

対象

  • パス: $ARGUMENTS (省略時は src/ ディレクトリ)
  • 拡張子: .lisp, .asd

検出ルール

以下のパターンを検出して空行を追加:

  • 行末が ) で終わり、次の行が ( で始まる(カラム0)

例外(空行不要)

以下のケースは空行を追加しない:

  1. declaim の直後 - 型宣言は関連する定義と一緒に

    (declaim (ftype ...))
    (defun foo ...)  ; OK: 空行不要
    
  2. 関連するグローバル変数 - defparameter/defvar の連続

    (defparameter *log-level* :debug)
    (defparameter *log-stream* *error-output*)  ; OK: 空行不要
    
  3. defpackagein-package

    (defpackage #:my-pkg ...)
    (in-package #:my-pkg)  ; OK: 空行不要
    

注意事項(誤検知の可能性)

  • #+(or) 等のリーダーマクロ直後 → 実際は無効化されたコード
  • 文字列リテラル内のLispコード → テストデータ等

検出結果を確認し、これらのケースは修正をスキップすること。

手順

  1. 指定パス内の .lisp ファイルを検索
  2. 各ファイルで空行が必要な箇所を検出
  3. 例外に該当しないケースのみ修正
  4. 修正内容をサマリーとして報告

検出用コマンド

python3 << 'EOF'
import os
import sys
import re

path = sys.argv[1] if len(sys.argv) > 1 else 'src'

def find_form_start(lines, end_line_idx):
    """括弧のバランスを追跡して、フォームの開始行を見つける"""
    depth = 0
    for i in range(end_line_idx, -1, -1):
        line = lines[i]
        # 文字列とコメントを除外した簡易カウント
        in_string = False
        for j, ch in enumerate(line):
            if ch == '"' and (j == 0 or line[j-1] != '\\'):
                in_string = not in_string
            if in_string:
                continue
            if ch == ';':
                break
            if ch == '(':
                depth -= 1
            elif ch == ')':
                depth += 1
        if depth <= 0:
            return i
    return 0

def get_form_type(lines, start_idx):
    """フォームの種類を取得(defun, defpackage, declaim等)"""
    line = lines[start_idx].strip()
    match = re.match(r'\((\S+)', line)
    return match.group(1) if match else None

def check_file(filepath):
    issues = []
    with open(filepath, 'r') as f:
        lines = f.readlines()

    for i in range(len(lines) - 1):
        curr = lines[i].rstrip()
        next_line = lines[i + 1]

        if not curr or not curr.endswith(')'):
            continue
        if not next_line.startswith('('):
            continue

        # 現在のフォームの種類を特定
        form_start = find_form_start(lines, i)
        form_type = get_form_type(lines, form_start)

        # 次のフォームの種類を特定
        next_match = re.match(r'\((\S+)', next_line)
        next_form_type = next_match.group(1) if next_match else None

        # 例外チェック
        # 1. declaim直後
        if form_type == 'declaim':
            continue
        # 2. defparameter/defvar連続
        if form_type in ('defparameter', 'defvar') and \
           next_form_type in ('defparameter', 'defvar'):
            continue
        # 3. defpackage → in-package
        if form_type == 'defpackage' and next_form_type == 'in-package':
            continue

        issues.append((i + 1, i + 2, form_type or '?', next_form_type or '?',
                      curr[-40:], next_line.rstrip()[:40]))

    return issues

for root, dirs, files in os.walk(path):
    dirs[:] = [d for d in dirs if not d.startswith('.')]
    for f in files:
        if f.endswith('.lisp') or f.endswith('.asd'):
            filepath = os.path.join(root, f)
            issues = check_file(filepath)
            for line1, line2, form1, form2, end, start in issues:
                print(f'{filepath}:{line1}-{line2} ({form1} -> {form2})')
                print(f'  L{line1}: ...{end}')
                print(f'  L{line2}: {start}')
                print()
EOF

Read the full file on GitHub · 149 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 149 lines · 19 tokens per session scan A 197ac959c967

Subscribe to this mod's changes

add-blank-lines is a command published in the GitHub repository cl-ai-project/cl-mcp (84 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 1,278 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.