Agent Skills › solatis/claude-config

solatis/claude-config

GitHub

将arXiv论文(TeX源码)转换为LLM可消费的干净Markdown格式。适用于用户提供arXiv ID或URL,以及从PDF文件夹同步学术论文到Markdown目标目录的场景。

11 个 Skill 887

安装全部 Skills

npx skills add solatis/claude-config --all -g -y
更多选项

预览集合内 Skills

npx skills add solatis/claude-config --list

集合内 Skills (11)

将arXiv论文(TeX源码)转换为LLM可消费的干净Markdown格式。适用于用户提供arXiv ID或URL,以及从PDF文件夹同步学术论文到Markdown目标目录的场景。
用户提供了arXiv ID或URL 需要从PDF文件夹同步学术论文到Markdown
skills/arxiv-to-md/SKILL.md
npx skills add solatis/claude-config --skill arxiv-to-md -g -y
SKILL.md
Frontmatter
{
    "name": "arxiv-to-md",
    "description": "Convert arXiv papers to LLM-consumable markdown. Invoke when user provides an arXiv ID or URL, or when syncing academic papers from a PDF folder to a markdown destination."
}

arXiv to Markdown

Convert arXiv papers (TeX source) to clean markdown for LLM consumption.

Invocation

Do NOT explore or analyze first. Run the script and follow its output.

提供分析Claude Code对话历史文件的参考文档,指导如何通过shell和jq查询JSONL格式的历史记录。涵盖目录结构解析、消息类型识别及常用查询命令,用于提取会话信息、工具调用统计等。
用户询问如何查看或搜索Claude Code的对话历史 需要分析特定会话中的工具调用或Token使用情况 请求解释Claude Code本地存储的文件结构和路径编码规则
skills/cc-history/SKILL.md
npx skills add solatis/claude-config --skill cc-history -g -y
SKILL.md
Frontmatter
{
    "name": "cc-history",
    "description": "Reference documentation for analyzing Claude Code conversation history files"
}

Claude Code History Analysis

Reference documentation for querying and analyzing Claude Code's conversation history. Use shell commands and jq to extract information from JSONL conversation files.

Directory Structure

~/.claude/projects/{encoded-path}/
  |-- {session-uuid}.jsonl          # Main conversation
  |-- {session-uuid}/
      |-- subagents/
      |   |-- agent-{hash}.jsonl    # Subagent conversations
      |-- tool-results/             # Large tool outputs

Project Path Resolution

Convert working directory to project directory:

PROJECT_DIR="~/.claude/projects/$(echo "$PWD" | sed 's|^/|-|; s|/\.|--|g; s|/|-|g')"

Encoding rules:

  • Leading / becomes -
  • Regular / becomes -
  • /. (hidden directory) becomes --

Examples:

  • /Users/bill/.claude -> -Users-bill--claude
  • /Users/bill/git/myproject -> -Users-bill-git-myproject

Message Types

Type Description
user User input messages
assistant Model responses (thinking, tool_use, text)
system System messages
queue-operation Background task notifications (subagent done)

Message Structure

Each line in a JSONL file is a message object:

{
  "type": "assistant",
  "uuid": "abc123",
  "parentUuid": "xyz789",
  "timestamp": "2025-01-15T19:39:16.000Z",
  "sessionId": "session-uuid",
  "message": {
    "role": "assistant",
    "content": [...],
    "usage": {
      "input_tokens": 20000,
      "output_tokens": 500,
      "cache_read_input_tokens": 15000,
      "cache_creation_input_tokens": 5000
    }
  }
}

Assistant message content blocks:

  • type: "thinking" - Model thinking (has thinking field)
  • type: "tool_use" - Tool invocation (has name, input fields)
  • type: "text" - Text response (has text field)

Common Queries

Find Conversations

# List by modification time (most recent first)
ls -lt "$PROJECT_DIR"/*.jsonl

# Find by date
ls -la "$PROJECT_DIR"/*.jsonl | grep "Jan 15"

# Find by content
grep -l "search term" "$PROJECT_DIR"/*.jsonl

Extract Messages

# Get message by line number (1-indexed)
sed -n '42p' file.jsonl | jq .

# Get message by uuid
jq -c 'select(.uuid=="abc123")' file.jsonl

# All user messages
jq -c 'select(.type=="user")' file.jsonl

# All assistant messages
jq -c 'select(.type=="assistant")' file.jsonl

Tool Call Analysis

# List all tool calls
jq -c 'select(.type=="assistant") | .message.content[]? | select(.type=="tool_use") | {name, input}' file.jsonl

# Count tool calls by name
jq -c 'select(.type=="assistant") | .message.content[]? | select(.type=="tool_use") | .name' file.jsonl | sort | uniq -c | sort -rn

# Find specific tool calls
jq -c 'select(.type=="assistant") | .message.content[]? | select(.type=="tool_use" and .name=="Bash")' file.jsonl

Skill Invocation Detection

Pattern: python3 -m skills\.([a-z_]+)\.

# Find all skill invocations
grep -oE "python3 -m skills\.[a-z_]+" file.jsonl | sort -u

# Find conversations using a specific skill
grep -l "python3 -m skills\.planner\." "$PROJECT_DIR"/*.jsonl

Token Usage

# Total tokens in conversation
jq -s '[.[].message.usage? | select(.) | .input_tokens + .output_tokens] | add' file.jsonl

# Token breakdown
jq -s '[.[].message.usage? | select(.)] | {
  input: (map(.input_tokens) | add),
  output: (map(.output_tokens) | add),
  cached: (map(.cache_read_input_tokens // 0) | add)
}' file.jsonl

# Token progression over time
jq -c 'select(.type=="assistant") | {ts: .timestamp[11:19], inp: .message.usage.input_tokens, out: .message.usage.output_tokens}' file.jsonl

Taxonomy Aggregation

# Count messages by type
jq -s 'group_by(.type) | map({type: .[0].type, count: length})' file.jsonl

# Character count in user messages
jq -s '[.[] | select(.type=="user") | .message.content | length] | add' file.jsonl

# Thinking block character count
jq -s '[.[] | select(.type=="assistant") | .message.content[]? | select(.type=="thinking") | .thinking | length] | add' file.jsonl

Subagent Analysis

# List subagents for a session
ls "${SESSION_DIR}/subagents/"

# Get subagent task description (first user message)
jq -c 'select(.type=="user") | .message.content' agent-*.jsonl | head -1

# Find Task tool calls in parent (these spawn subagents)
jq -c 'select(.type=="assistant") | .message.content[]? | select(.type=="tool_use" and .name=="Task") | .input' file.jsonl

Conversation Branching

Each .jsonl file contains the entire conversation tree (all branches), not separate files per branch. Branching is tracked via parentUuid:

  • When user goes back in history and issues a new command, the new message gets the same parentUuid as where they branched from
  • Multiple messages sharing the same parentUuid = sibling branches (fork point)

Detecting Branch Points

# Find all fork points (messages with multiple children)
jq -s 'group_by(.parentUuid) | map(select(length > 1)) | .[] | {
  parentUuid: .[0].parentUuid,
  branches: length,
  timestamps: [.[].timestamp]
}' file.jsonl

# Show siblings at a known fork point
FORK_POINT="parent-uuid-here"
jq -c --arg fp "$FORK_POINT" 'select(.parentUuid==$fp) | {uuid, ts: .timestamp, preview: (.message.content | tostring)[:100]}' file.jsonl

Extracting a Single Branch

To filter for exactly one branch, find a unique identifier in that branch, then walk the ancestor chain back to root.

Step 1: Find target message uuid

# By unique content
TARGET=$(jq -r 'select(.message.content | tostring | contains("unique-identifier")) | .uuid' file.jsonl | tail -1)

# By timestamp prefix
TARGET=$(jq -r 'select(.timestamp | startswith("2026-01-28T11:23")) | .uuid' file.jsonl | head -1)

Step 2: Extract branch as JSONL stream

# Outputs one message per line (JSONL), oldest first
extract_branch() {
  jq -c -s --arg target "$1" '
    (map({(.uuid): .}) | add) as $lookup |
    {chain: [], current: $target} |
    until(.current == null or ($lookup[.current] | not);
      ($lookup[.current]) as $msg |
      .chain += [$msg] |
      .current = $msg.parentUuid
    ) |
    .chain | reverse | .[]
  ' "$2"
}

# Usage: extract_branch <target-uuid> <file>
extract_branch "$TARGET" file.jsonl | jq -s 'length'
extract_branch "$TARGET" file.jsonl | jq 'select(.type=="user")'

Step 3: Common branch queries

# Message count
extract_branch "$TARGET" file.jsonl | jq -s 'length'

# User messages only
extract_branch "$TARGET" file.jsonl | jq 'select(.type=="user")'

# Tool calls
extract_branch "$TARGET" file.jsonl | jq 'select(.type=="assistant") | .message.content[]? | select(.type=="tool_use") | {name}'

# First and last messages (verify correct branch)
extract_branch "$TARGET" file.jsonl | jq -s '[.[0], .[-1]] | .[] | {type, ts: .timestamp}'

Workflow: Pinpoint and Explore

# 1. Find conversation file
FILE=$(grep -l "unique-identifier" "$PROJECT_DIR"/*.jsonl)

# 2. Find matching messages (may show multiple branches)
jq -c 'select(.message.content | tostring | contains("unique-identifier")) | {uuid, ts: .timestamp, parentUuid}' "$FILE"

# 3. Pick target uuid from desired branch, then query
TARGET="uuid-from-step-2"
extract_branch "$TARGET" "$FILE" | jq 'select(.type=="user") | .message.content'

Correlation

Subagent files (agent-{hash}.jsonl) don't link directly to parent Task calls. To correlate:

  1. List all subagent files under {session}/subagents/
  2. Read first user message of each for task description
  3. Match description to Task tool_use blocks in parent conversation
用于快速理解代码库结构、架构及上下文的基础分析技能。用户请求代码理解或仓库定向时立即触发,直接调用Python脚本执行探索工作流,为后续分析和重构提供基础支撑。
用户请求理解代码库整体结构 用户需要掌握代码库架构设计 用户希望进行仓库初始定向与熟悉
skills/codebase-analysis/SKILL.md
npx skills add solatis/claude-config --skill codebase-analysis -g -y
SKILL.md
Frontmatter
{
    "name": "codebase-analysis",
    "description": "Invoke IMMEDIATELY via python script when user requests codebase understanding, architecture comprehension, or repository orientation. Do NOT explore first - the script orchestrates exploration."
}

Codebase Analysis

Understanding-focused skill that builds foundational comprehension of codebase structure, patterns, flows, decisions, and context. Serves as foundation for downstream analysis skills (problem-analysis, refactor, etc.).

When this skill activates, IMMEDIATELY invoke the script. The script IS the workflow.

Invoke:

通过立即调用Python脚本对决策和推理进行压力测试与批判。该技能直接执行批评工作流,无需预先分析,支持多步骤迭代以优化决策质量。
需要评估决策合理性时 希望深入批判推理逻辑时
skills/decision-critic/SKILL.md
npx skills add solatis/claude-config --skill decision-critic -g -y
SKILL.md
Frontmatter
{
    "name": "decision-critic",
    "description": "Invoke IMMEDIATELY via python script to stress-test decisions and reasoning. Do NOT analyze first - the script orchestrates the critique workflow."
}

Decision Critic

When this skill activates, IMMEDIATELY invoke the script. The script IS the workflow.

Invocation

Argument Required Description
--step Yes Current step (1-7)
--decision Step 1 The decision statement being criticized

Do NOT analyze or critique first. Run the script and follow its output.

用于处理开放式分析问题的结构化推理技能。当用户请求深度思考时,立即执行Python脚本启动思维工作流,禁止先探索或分析,直接运行并遵循脚本输出结果。
用户请求对开放式问题进行分析 用户需要结构化的推理过程
skills/deepthink/SKILL.md
npx skills add solatis/claude-config --skill deepthink -g -y
SKILL.md
Frontmatter
{
    "name": "deepthink",
    "description": "Invoke IMMEDIATELY via python script when user requests structured reasoning for open-ended analytical questions. Do NOT explore first - the script orchestrates the thinking workflow."
}

DeepThink

When this skill activates, IMMEDIATELY invoke the script. The script IS the workflow.

Invoke:

Do NOT explore or analyze first. Run the script and follow its output.

同步仓库文档,维护CLAUDE.md导航层级和README.md。通过发现、审计和内容迁移三个阶段,确保索引准确,将非操作性内容从CLAUDE.md移至README.md,支持全库或指定范围操作。
用户请求同步文档 用户要求更新文档结构
skills/doc-sync/SKILL.md
npx skills add solatis/claude-config --skill doc-sync -g -y
SKILL.md
Frontmatter
{
    "name": "doc-sync",
    "description": "Synchronizes docs across a repository. Use when user asks to sync docs."
}

Doc Sync

Maintains the CLAUDE.md navigation hierarchy and README.md invisible knowledge docs across a repository. This skill is self-contained and performs all documentation work directly.

Documentation Conventions

For authoritative CLAUDE.md and README.md format specification:

The conventions/ directory contains all universal documentation standards.

Scope Resolution

Determine scope FIRST:

User Request Scope
"sync docs" / "update documentation" / no specific path REPOSITORY-WIDE
"sync docs in src/validator/" DIRECTORY: src/validator/ and descendants
"update CLAUDE.md for parser.py" FILE: single file's parent directory

For REPOSITORY-WIDE scope, perform a full audit. For narrower scopes, operate only within the specified boundary.

Workflow

Phase 1: Discovery

Map directories requiring CLAUDE.md verification:

# Find all directories (excluding .git, node_modules, __pycache__, etc.)
find . -type d \( -name .git -o -name node_modules -o -name __pycache__ -o -name .venv -o -name target -o -name dist -o -name build \) -prune -o -type d -print

For each directory in scope, record:

  1. Does CLAUDE.md exist?
  2. If yes, does it have the required table-based index structure?
  3. What files/subdirectories exist that need indexing?

Phase 2: Audit

For each directory, check for drift and misplaced content:

<audit_check dir="[path]">
CLAUDE.md exists: [YES/NO]
Has table-based index: [YES/NO]
Files in directory: [list]
Files in index: [list]
Missing from index: [list]
Stale in index (file deleted): [list]
Triggers are task-oriented: [YES/NO/PARTIAL]
Contains misplaced content: [YES/NO] (architecture/design docs that belong in README.md)
README.md exists: [YES/NO]
README.md warranted: [YES/NO] (invisible knowledge present?)
</audit_check>

Phase 3: Content Migration

Critical: If CLAUDE.md contains content that does NOT belong there, migrate it:

Content that MUST be moved from CLAUDE.md to README.md:

  • Architecture explanations or diagrams
  • Design decision documentation
  • Component interaction descriptions
  • Overview sections with prose (beyond one sentence)
  • Invariants or rules documentation
  • Any "why" explanations beyond simple triggers
  • Key Invariants sections
  • Dependencies sections (explanatory -- index can note dependencies exist)
  • Constraints sections
  • Purpose sections with prose (beyond one sentence)
  • Any bullet-point lists explaining rationale

Content that MAY stay in CLAUDE.md (operational sections):

  • Build commands specific to this directory
  • Test commands specific to this directory
  • Regeneration/sync commands (e.g., protobuf regeneration)
  • Deploy commands
  • Other copy-pasteable procedural commands

Test: Ask "is this explaining WHY or telling HOW?" Explanatory content (architecture, decisions, rationale) goes to README.md. Operational content (commands, procedures) stays in CLAUDE.md.

Migration process:

  1. Identify misplaced content in CLAUDE.md
  2. Create or update README.md with the architectural content
  3. Strip CLAUDE.md down to pure index format
  4. Add README.md to the CLAUDE.md index table

Phase 4: Index Updates

For each directory needing work:

Creating/Updating CLAUDE.md:

  1. Use the appropriate template (ROOT or SUBDIRECTORY)
  2. Populate tables with all files and subdirectories
  3. Write "What" column: factual content description
  4. Write "When to read" column: action-oriented triggers
  5. If README.md exists, include it in the Files table

Creating README.md (when invisible knowledge exists):

  1. Verify invisible knowledge exists (semantic trigger, not structural)
  2. Document architecture, design decisions, invariants, tradeoffs
  3. Apply the content test: remove anything visible from code
  4. Keep as concise as possible while capturing all invisible knowledge
  5. Must be self-contained: do not reference external authoritative sources

Phase 5: Verification

After all updates complete, verify:

  1. Every directory in scope has CLAUDE.md
  2. All CLAUDE.md files use table-based index format (pure navigation)
  3. No drift remains (files <-> index entries match)
  4. No misplaced content in CLAUDE.md (explanatory prose moved to README.md)
  5. README.md files are indexed in their parent CLAUDE.md
  6. CLAUDE.md contains only: one-sentence overview + tabular index + operational sections
  7. README.md exists wherever invisible knowledge was identified
  8. README.md files are self-contained (no external authoritative references)

Output Format

## Doc Sync Report

### Scope: [REPOSITORY-WIDE | directory path]

### Changes Made
- CREATED: [list of new CLAUDE.md files]
- UPDATED: [list of modified CLAUDE.md files]
- MIGRATED: [list of content moved from CLAUDE.md to README.md]
- CREATED: [list of new README.md files]
- FLAGGED: [any issues requiring human decision]

### Verification
- Directories audited: [count]
- CLAUDE.md coverage: [count]/[total] (100%)
- CLAUDE.md format: [count] pure index / [count] needed migration
- Drift detected: [count] entries fixed
- Content migrations: [count] (prose moved to README.md)
- README.md files: [count] (wherever invisible knowledge exists)
- Self-contained: [YES/NO] (no external authoritative references)

Exclusions

DO NOT create CLAUDE.md for:

  • Generated files directories (dist/, build/, compiled outputs)
  • Vendored dependencies (node_modules/, vendor/, third_party/)
  • Git internals (.git/)
  • IDE/editor configs (.idea/, .vscode/ unless project-specific settings)
  • Stub directories (contain only .gitkeep or no code files) - these do not require CLAUDE.md until code is added

DO NOT index (skip these files in CLAUDE.md):

  • Generated files (.generated., compiled outputs)
  • Vendored dependency files

DO index:

  • Hidden config files that affect development (.eslintrc, .env.example, .gitignore)
  • Test files and test directories
  • Documentation files (including README.md)

Anti-Patterns

Index Anti-Patterns

Too vague (matches everything):

| `config/` | Configuration | Working with configuration |

Content description instead of trigger:

| `cache.rs` | Contains the LRU cache implementation | - |

Missing action verb:

| `parser.py` | Input parsing | Input parsing and format handling |

Correct Examples

| `cache.rs` | LRU cache with O(1) get/set | Implementing caching, debugging misses, tuning eviction |
| `config/` | YAML config parsing, env overrides | Adding config options, changing defaults, debugging config loading |

When NOT to Use This Skill

  • Single file documentation (inline comments, docstrings) - handle directly
  • Code comments - handle directly
  • Function/module docstrings - handle directly
  • This skill is for CLAUDE.md/README.md synchronization specifically

Reference

For additional trigger pattern examples, see references/trigger-patterns.md.

自动检测并解决文档、代码、规范与实现之间的不一致性。通过分阶段脚本执行,先扫描验证候选问题,再交互式收集用户决策,最后应用修复并生成报告,无需手动编辑文件。
发现文档与代码不一致 检查规范与实现差异
skills/incoherence/SKILL.md
npx skills add solatis/claude-config --skill incoherence -g -y
SKILL.md
Frontmatter
{
    "name": "incoherence",
    "description": "Detect and resolve incoherence in documentation, code, specs vs implementation."
}

Incoherence Detector

When this skill activates, IMMEDIATELY invoke the script. The script IS the workflow.

Invocation

Argument Required Description
--step-number Yes Current step (starts at 1)
--thoughts Yes Accumulated state from all previous steps

Do NOT explore or detect first. Run the script and follow its output.

Workflow Phases

  1. Detection (steps 1-12): Survey codebase, explore dimensions, verify candidates
  2. Resolution (steps 13-15): Present issues via AskUserQuestion, collect user decisions
  3. Application (steps 16-21): Apply resolutions, present final report

Resolution is interactive - user answers structured questions inline. No manual file editing required.

用于复杂任务的交互式规划与执行。当用户提出计划、设计、架构或执行实施相关请求时,立即调用对应的Python脚本启动工作流,分为规划模式和执行模式。
用户要求制定计划 用户要求进行系统设计 用户要求架构设计 用户要求执行实现 用户要求运行已制定的计划
skills/planner/SKILL.md
npx skills add solatis/claude-config --skill planner -g -y
SKILL.md
Frontmatter
{
    "name": "planner",
    "description": "Interactive planning and execution for complex tasks. IMMEDIATELY invoke when user asks to use planner."
}

Activation

When this skill activates, IMMEDIATELY invoke the corresponding script. The script IS the workflow.

Mode Intent Command
planning "plan", "design", "architect" <invoke working-dir=".claude/skills/scripts" cmd="python3 -m skills.planner.orchestrator.planner --step 1" />
execution "execute", "implement", "run plan" <invoke working-dir=".claude/skills/scripts" cmd="python3 -m skills.planner.orchestrator.executor --step 1" />
用于立即执行问题分析和根本原因调查。当用户请求问题时,直接调用Python脚本进行排查,不预先探索或分析,专注于识别问题成因而非解决方案。
用户请求问题分析 用户请求根本原因调查
skills/problem-analysis/SKILL.md
npx skills add solatis/claude-config --skill problem-analysis -g -y
SKILL.md
Frontmatter
{
    "name": "problem-analysis",
    "description": "Invoke IMMEDIATELY via python script when user requests problem analysis or root cause investigation. Do NOT explore first - the script orchestrates the investigation."
}

Problem Analysis

Root cause identification skill. Identifies WHY a problem occurs, NOT how to fix it.

Invocation

Do NOT explore or analyze first. Run the script and follow its output.

用于立即调用Python脚本进行提示词优化。无需分析,直接执行分步工作流(侦察、单提示词、生态系统、从零设计或问题修复),根据步骤1确定的范围自动推进后续优化流程。
用户请求提示词优化 需要自动化Prompt工程任务
skills/prompt-engineer/SKILL.md
npx skills add solatis/claude-config --skill prompt-engineer -g -y
SKILL.md
Frontmatter
{
    "name": "prompt-engineer",
    "description": "Invoke IMMEDIATELY via python script when user requests prompt optimization. Do NOT analyze first - invoke this skill immediately."
}

Prompt Engineer

When this skill activates, IMMEDIATELY invoke the script. The script IS the workflow.

Invocation

Start with step 1 (triage) to determine scope:

Then continue with determined scope:

Argument Required Description
--step Yes Current step (1 = triage, 2-6 = workflow)
--scope For 2+ Required for steps 2-6. Determined by step 1.

Scopes

  • single-prompt: One prompt file, general optimization
  • ecosystem: Multiple related prompts that interact
  • greenfield: No existing prompt, designing from requirements
  • problem: Existing prompt(s) with specific issue to fix

Do NOT analyze or explore first. Run the script and follow its output.

用于代码重构、技术债务审查和质量改进。激活后立即执行Python脚本,根据范围自动调整分析类别数量,无需手动探索,直接遵循脚本输出进行工作流处理。
用户请求代码重构分析 用户要求进行技术债务审查 用户寻求代码质量改进建议
skills/refactor/SKILL.md
npx skills add solatis/claude-config --skill refactor -g -y
SKILL.md
Frontmatter
{
    "name": "refactor",
    "description": "Invoke IMMEDIATELY via python script when user requests refactoring analysis, technical debt review, or code quality improvement. Do NOT explore first - the script orchestrates exploration."
}

Refactor

When this skill activates, IMMEDIATELY invoke the script. The script IS the workflow.

Invocation

Argument Required Description
--step Yes Current step (starts at 1)
--n No Number of categories to explore (default: 10)

Do NOT explore or analyze first. Run the script and follow its output.

Determining N (category count)

Default: N = 10

Adjust based on user request scope:

  • SMALL (single file, specific concern, "quick look"): N = 5
  • MEDIUM (directory, module, standard analysis): N = 10
  • LARGE (entire codebase, "thorough", "comprehensive"): N = 25

The script randomly selects N categories from the 38 available code quality categories defined in conventions/code-quality/.

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-15 04:26
浙ICP备14020137号-1 $访客地图$