Consolidate 4 skills into 1 with progressive disclosure#81
Open
gdilla wants to merge 1 commit intoDeusData:mainfrom
Open
Consolidate 4 skills into 1 with progressive disclosure#81gdilla wants to merge 1 commit intoDeusData:mainfrom
gdilla wants to merge 1 commit intoDeusData:mainfrom
Conversation
Merge codebase-memory-exploring, codebase-memory-tracing, codebase-memory-quality, and codebase-memory-reference into a single codebase-memory skill with a references/ directory. Motivation: - Each skill registered a separate description entry that Claude scans at session startup. 4 skills = 4 description entries consuming listing space when 1 would suffice with a broader trigger phrase set. - The 4 skills had overlapping content (gotchas, tips) scattered across files with no single source of truth. - Per Anthropic's Agent Skills best practices and official spec (agentskills.io), skills should use progressive disclosure: a concise SKILL.md (<500 lines, <5000 tokens) loaded on activation, with detailed reference material in separate files loaded on demand. What changed: - assets/skills/: 4 separate skill directories replaced by 1 codebase-memory/ directory with references/ subdirectory - SKILL.md (54 lines): decision matrix, quick workflows, consolidated gotchas section — everything an agent needs to pick the right tool - references/exploring.md: codebase exploration workflows - references/tracing.md: call chain tracing, impact analysis, cross-service - references/quality.md: dead code, fan-out/fan-in, change coupling - references/tool-reference.md: all 14 tools, edge types, Cypher syntax, regex patterns - cli.c: embedded skill content consolidated into single string with decision matrix, all workflows, and gotchas - cli.h: CBM_SKILL_COUNT 4 → 1 - test_cli.c: updated to test single consolidated skill covering all capabilities The consolidated gotchas section surfaces the 5 most common mistakes (search_graph vs query_graph for edges, 200-row cap, exact name requirement, direction="both" for cross-service, pagination) in the main SKILL.md where the agent reads them before encountering issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codebase-memory-exploring,codebase-memory-tracing,codebase-memory-quality,codebase-memory-reference) into a singlecodebase-memoryskill with areferences/directoryWhy
Problem: 4 description entries at startup
Every installed skill registers a
name+descriptionentry that the agent scans at session startup to decide which skills are relevant. With 4 separate skills, that's 4 entries consuming listing space — when a single skill with a comprehensive description covers all the same trigger phrases.Problem: no progressive disclosure
The official spec recommends SKILL.md under 500 lines / ~5000 tokens, with detailed reference material in separate files loaded on demand. The current 4 skills are each standalone SKILL.md files with no
references/directory, meaning all content loads at activation regardless of what the user actually asked about.Problem: scattered gotchas
The most valuable content — the pitfalls that prevent users from hitting common mistakes — was scattered across 4 files with no single source of truth. Per Anthropic's guidance: "The highest-value content in many skills is a list of gotchas."
What changed
assets/skills/(the skill files)codebase-memory-exploring/SKILL.md(90 lines)codebase-memory/references/exploring.md(61 lines)codebase-memory-tracing/SKILL.md(125 lines)codebase-memory/references/tracing.md(99 lines)codebase-memory-quality/SKILL.md(101 lines)codebase-memory/references/quality.md(85 lines)codebase-memory-reference/SKILL.md(154 lines)codebase-memory/references/tool-reference.md(118 lines)codebase-memory/SKILL.md(54 lines) — decision matrix + gotchasThe new
SKILL.mdis 54 lines and contains:Reference files are loaded only when the agent needs them for the specific task.
src/cli/cli.c(embedded skill content)The 4 embedded C string constants are replaced by 1 self-contained skill that includes the decision matrix, all workflows, tool listing, edge types, Cypher examples, and gotchas. This embedded version is a fallback for the CLI installer — the full skill with
references/directory is inassets/skills/.src/cli/cli.hCBM_SKILL_COUNTchanged from 4 to 1.tests/test_cli.cUpdated to test the single consolidated skill. Verifies that all capabilities from all 4 former skills are present (search_graph, trace_call_path, detect_changes, max_degree, exclude_entry_points, query_graph, Cypher, 14 MCP Tools) plus the new gotchas section.
Migration
Users who have the old skills installed in
~/.claude/skills/should:codebase-memory-exploring,codebase-memory-tracing,codebase-memory-quality,codebase-memory-referencecodebase-memoryskill will be installed automatically on next runNo functionality is lost — all content is preserved in the reference files.
Test plan
CBM_SKILL_COUNTcompiles correctly as 1test_cli.cpasses — consolidated skill contains all capabilitiescodebase-memory/directory withreferences/subdirectory🤖 Generated with Claude Code