feat(skills): add agent-sort skill for evidence-based ECC installation#965
feat(skills): add agent-sort skill for evidence-based ECC installation#965BoyanCoding wants to merge 1 commit intoaffaan-m:mainfrom
Conversation
Implements issue affaan-m#916: Evidence-based ECC installation using parallel agents. This skill uses 6 parallel agents to analyze a codebase and automatically sort 291 ECC items into DAILY (matches project stack) vs LIBRARY (accessible on-demand), reducing token overhead by ~60%. Features: - 6 parallel agents analyze agents, skills, commands, rules, hooks, and extras - Each agent greps codebase for evidence to determine relevance - DAILY items (~100 tokens each) copied to .claude/skills/ for immediate loading - LIBRARY items (0 tokens) stored in skill-library/references/ for on-demand access - Creates searchable router (skill-library/SKILL.md) for discovering library items - Removes stale rules for languages not detected in project Results (tested on React Native + TypeScript + Supabase project): - Before: 200+ skills, ~12,000 tokens overhead - After: 51 daily items, ~5,100 tokens overhead - Library: 168 reference files, 0 tokens until triggered - Time: ~8 minutes (6 agents in parallel) - Missed items: 0 (agents read every single ECC item) - Wrong items: 0 (every decision backed by grep evidence)
📝 WalkthroughWalkthroughThis PR introduces documentation and implementation for a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds a new Confidence Score: 3/5Not safe to merge as-is — two P1 gaps mean LIBRARY installation silently does nothing and extras copy commands fail. Two P1 defects exist on the primary code path: (1) the LIBRARY copy loop in Step 5b has no implementation so library items are never installed, and (2) the extras source path skills/agent-sort/SKILL.md — Step 5b and the extras source path in Step 5a both need concrete implementation before this skill works end-to-end. Important Files Changed
Reviews (1): Last reviewed commit: "feat(skills): add agent-sort skill for e..." | Re-trigger Greptile |
|
|
||
| # DAILY Extras | ||
| for extra in $DAILY_EXTRAS; do | ||
| cp "$ECC_ROOT/extras/$extra" "$TARGET/extras/" | ||
| done | ||
| ``` | ||
|
|
||
| ### 5b: Install LIBRARY Items | ||
|
|
There was a problem hiding this comment.
LIBRARY installation loop body is unimplemented
The for-loop in Step 5b has only placeholder comments in its body, which means LIBRARY items are never actually copied to the skill-library/references directory. This is a critical gap: the loop iterates over all LIBRARY items but performs no copy operation. Any user running agent-sort would end up with an empty (or missing) library.
Compare this to Step 5a, which has concrete cp commands per item type. Step 5b needs equivalent logic that distinguishes item types (skills are directories using cp -r, commands/rules/agents/hooks are single files using cp) and copies each to the correct source path.
| - `DAILY_SKILLS`, `LIBRARY_SKILLS` | ||
| - `DAILY_COMMANDS`, `LIBRARY_COMMANDS` | ||
| - `DAILY_RULES`, `LIBRARY_RULES` | ||
| - `DAILY_HOOKS`, `LIBRARY_HOOKS` | ||
| - `DAILY_EXTRAS`, `LIBRARY_EXTRAS` | ||
|
|
||
| --- | ||
|
|
||
| ## Step 5: Execute Installation | ||
|
|
||
| ### 5a: Install DAILY Items | ||
|
|
||
| ```bash | ||
| # DAILY Agents | ||
| for agent in $DAILY_AGENTS; do | ||
| cp "$ECC_ROOT/agents/$agent" "$TARGET/agents/" | ||
| done | ||
|
|
||
| # DAILY Skills | ||
| for skill in $DAILY_SKILLS; do | ||
| cp -r "$ECC_ROOT/skills/$skill" "$TARGET/skills/" | ||
| done |
There was a problem hiding this comment.
Extras source path mismatch with Agent 6's scan scope
Agent 6 is told to read from $ECC_ROOT/contexts/, $ECC_ROOT/mcp-configs/, and guides/. But Step 5a's copy commands reference $ECC_ROOT/extras/$extra — a directory that does not exist in the ECC repository structure (the real directories are agents/, skills/, commands/, hooks/, rules/, scripts/, mcp-configs/, tests/).
This path mismatch means every cp for DAILY Extras items will fail with "No such file or directory". The copy block needs to mirror the actual ECC layout Agent 6 scans.
| Print summary: | ||
|
|
||
| ``` | ||
| ## Agent Sort Installation Complete | ||
|
|
||
| ### Installation Summary |
There was a problem hiding this comment.
Step 7 is completely unimplemented
Step 7 ("Remove Stale Rules") consists of only two comments with no actual logic. This means stale rules from previously installed but no-longer-matching languages will never be cleaned up. If this step is out of scope for v1.0, it should be documented as a known limitation rather than left as dead placeholder comments.
| Analyze ECC agents and sort into DAILY vs LIBRARY. | ||
|
|
||
| ECC_ROOT: /tmp/everything-claude-code | ||
| Working directory: [current project path] | ||
|
|
||
| TASK: Read each agent in $ECC_ROOT/agents/*.md and sort: | ||
|
|
||
| For each agent: | ||
| 1. Read the agent .md file | ||
| 2. Check frontmatter description for what it does | ||
| 3. Grep the codebase for evidence: | ||
| - Agent mentions 'typescript' → grep for .ts/.tsx files, 'typescript' in package.json | ||
| - Agent mentions 'python' → grep for .py files, requirements.txt, pyproject.toml | ||
| - Agent mentions 'django' → grep for django imports, settings.py | ||
| - Agent mentions 'rust' → grep for .rs files, Cargo.toml | ||
| - Agent mentions 'security' → check for auth, encryption, secrets handling | ||
| - Agent mentions 'testing' → check for test files, test configs |
There was a problem hiding this comment.
|
|
||
| Create `$TARGET/skills/skill-library/SKILL.md`: | ||
|
|
||
| ```markdown | ||
| --- | ||
| name: skill-library | ||
| description: On-demand access to 200+ ECC skills, commands, and agents — zero tokens until you search | ||
| origin: ECC | ||
| --- | ||
|
|
||
| # Skill Library — On-Demand ECC Access | ||
|
|
||
| This skill provides searchable access to ECC items not loaded by default. | ||
|
|
||
| ## Quick Search | ||
|
|
||
| Search this file for keywords to find what you need: | ||
| - Languages: python, typescript, go, rust, java, cpp, php, ruby | ||
| - Frameworks: django, react, nextjs, springboot, laravel | ||
| - Topics: testing, security, api, database, deployment | ||
|
|
||
| ## Available Library Items | ||
|
|
||
| ### Skills | ||
| [List all LIBRARY skills with brief descriptions] | ||
|
|
||
| ### Commands | ||
| [List all LIBRARY commands with brief descriptions] | ||
|
|
||
| ### Agents | ||
| [List all LIBRARY agents with brief descriptions] | ||
|
|
||
| ## How to Use | ||
|
|
||
| 1. Search this file for the item you need | ||
| 2. Copy from: `~/.claude/skills/skill-library/references/[item-name]/` |
There was a problem hiding this comment.
Router SKILL.md template contains literal placeholder text
The generated skill-library/SKILL.md includes static placeholder strings like [List all LIBRARY skills with brief descriptions] rather than instructions for the agent to dynamically populate them. When an agent writes this file verbatim, the router will contain unhelpful bracketed placeholders instead of the actual library index.
| @@ -0,0 +1,59 @@ | |||
| --- | |||
| description: Evidence-based ECC installation using 6 parallel agents — automatically sorts 291 items into DAILY (matches your stack) vs LIBRARY (accessible on-demand) | |||
| --- | |||
There was a problem hiding this comment.
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@skills/agent-sort/SKILL.md`:
- Around line 21-27: Rename the nonconforming Markdown headings to match the
required skill format: change the "When to Activate" heading to "When to Use"
and change "Example Agent Output" to "Examples" (leave "How It Works" as-is);
update any internal references or links in SKILL.md that point to the old
headings to use the new titles so anchors remain correct.
- Around line 483-492: The loop that builds LIBRARY references is a no-op;
implement copy logic so items in LIBRARY_SKILLS, LIBRARY_COMMANDS,
LIBRARY_AGENTS, LIBRARY_RULES, LIBRARY_HOOKS and LIBRARY_EXTRAS are actually
copied into LIBRARY_DIR. Inside the for loop (the block iterating over
$LIBRARY_SKILLS $LIBRARY_COMMANDS $LIBRARY_AGENTS $LIBRARY_RULES $LIBRARY_HOOKS
$LIBRARY_EXTRAS) check that each $item exists and then copy it preserving
directory structure, e.g. use cp -a --parents "$item" "$LIBRARY_DIR" (or rsync
-a with equivalent flags), and skip empty/unset variables to avoid errors; keep
using LIBRARY_DIR and the existing mkdir -p call.
- Around line 132-138: The mkdir block that creates target subdirectories is
missing creation of the extras folder referenced later; add creation of
$TARGET/extras alongside the other mkdir -p lines so the later loop that copies
DAILY_EXTRAS into $TARGET/extras/ (the code that iterates over DAILY_EXTRAS)
will succeed; update the same mkdir list that contains $TARGET/skills,
$TARGET/commands, $TARGET/agents, $TARGET/rules, $TARGET/hooks, and
$TARGET/skills/skill-library/references to also include $TARGET/extras.
- Around line 531-534: The router instructions hardcode a user-home path (the
lines that currently read
"~/.claude/skills/skill-library/references/[item-name]/" and
"~/.claude/skills/") which breaks project-level installs; update the steps to
avoid hardcoded home paths by replacing those literal paths with a configurable
placeholder (e.g., $CLAUDE_DIR or <claude_dir>) and add a short note that
$CLAUDE_DIR may point to either a project-level ".claude" or a user-level
"~/.claude"; ensure Step 2 and Step 3 reference the placeholder and include
one-line guidance on how users can set or detect $CLAUDE_DIR (project vs user)
so both install modes route correctly.
- Around line 388-394: The copy step uses the wrong source path for extras
because it assumes all extras live under $ECC_ROOT/extras/, but the agent output
includes a TYPE field (context|mcp-config|guide) and each extra actually lives
under separate directories; update the copy logic that references the variable
extra to build the source path using TYPE (e.g., $ECC_ROOT/{TYPE}/{extra}) or
persist TYPE with each extra and use it when constructing the cp/move source;
look for the loop or command that uses the variable extra and the TYPE field and
change the source construction accordingly so contexts, mcp-configs and guides
are copied from their respective directories.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b0f5a3dc-697f-47e0-b46f-5e0dd4b772d8
📒 Files selected for processing (2)
commands/agent-sort.mdskills/agent-sort/SKILL.md
| ## When to Activate | ||
|
|
||
| - User says `/agent-sort`, "install ecc", "setup everything claude code" | ||
| - User wants selective ECC installation without manual cherry-picking | ||
| - User wants to optimize token usage while keeping full access | ||
|
|
||
| ## How It Works |
There was a problem hiding this comment.
Align section titles with required skill format headings.
The file uses When to Activate and Example Agent Output. The required section names are When to Use, How It Works, and Examples. How It Works is present, but the other two should be renamed for consistency.
Proposed fix
-## When to Activate
+## When to Use
...
-## Example Agent Output
+## ExamplesAs per coding guidelines, "skills/**/*.md: Skills must be formatted as Markdown files with clear sections including 'When to Use', 'How It Works', and 'Examples'."
Also applies to: 599-601
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/agent-sort/SKILL.md` around lines 21 - 27, Rename the nonconforming
Markdown headings to match the required skill format: change the "When to
Activate" heading to "When to Use" and change "Example Agent Output" to
"Examples" (leave "How It Works" as-is); update any internal references or links
in SKILL.md that point to the old headings to use the new titles so anchors
remain correct.
| mkdir -p $TARGET/skills | ||
| mkdir -p $TARGET/commands | ||
| mkdir -p $TARGET/agents | ||
| mkdir -p $TARGET/rules | ||
| mkdir -p $TARGET/hooks | ||
| mkdir -p $TARGET/skills/skill-library/references | ||
| ``` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify mismatch between mkdir targets and copy destinations in this skill file.
rg -n 'mkdir -p \$TARGET/' skills/agent-sort/SKILL.md
rg -n 'cp "\$ECC_ROOT/.*" "\$TARGET/extras/"' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 320
🏁 Script executed:
#!/bin/bash
# Get context around the copy command at line 477
sed -n '470,485p' skills/agent-sort/SKILL.md
# Check if $TARGET/extras is created anywhere else in the file
rg -n 'mkdir.*extras|touch.*extras' skills/agent-sort/SKILL.md
# Check if line 477 is part of a conditional or if it's always executed
sed -n '460,480p' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 837
🏁 Script executed:
#!/bin/bash
# Get the complete mkdir block context
sed -n '130,140p' skills/agent-sort/SKILL.md
# Check if $DAILY_EXTRAS is set to any value
rg -n 'DAILY_EXTRAS=' skills/agent-sort/SKILL.md
# Check what variables are set in the configuration
sed -n '1,200p' skills/agent-sort/SKILL.md | rg -n 'DAILY_|LIBRARY_'Repository: affaan-m/everything-claude-code
Length of output: 263
🏁 Script executed:
#!/bin/bash
# Get file size to understand scope
wc -l skills/agent-sort/SKILL.md
# Search entire file for DAILY_EXTRAS and where variables are defined
rg -n 'DAILY_EXTRAS|ECC_ROOT' skills/agent-sort/SKILL.md | head -30Repository: affaan-m/everything-claude-code
Length of output: 1239
Create $TARGET/extras directory in the mkdir block.
The for loop at line 476–477 copies DAILY_EXTRAS items to $TARGET/extras/, but that directory is never created in Step 2. Installations will fail if any DAILY_EXTRAS are provided.
Proposed fix
mkdir -p $TARGET/skills
mkdir -p $TARGET/commands
mkdir -p $TARGET/agents
mkdir -p $TARGET/rules
mkdir -p $TARGET/hooks
+mkdir -p $TARGET/extras
mkdir -p $TARGET/skills/skill-library/references📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| mkdir -p $TARGET/skills | |
| mkdir -p $TARGET/commands | |
| mkdir -p $TARGET/agents | |
| mkdir -p $TARGET/rules | |
| mkdir -p $TARGET/hooks | |
| mkdir -p $TARGET/skills/skill-library/references | |
| ``` | |
| mkdir -p $TARGET/skills | |
| mkdir -p $TARGET/commands | |
| mkdir -p $TARGET/agents | |
| mkdir -p $TARGET/rules | |
| mkdir -p $TARGET/hooks | |
| mkdir -p $TARGET/extras | |
| mkdir -p $TARGET/skills/skill-library/references |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/agent-sort/SKILL.md` around lines 132 - 138, The mkdir block that
creates target subdirectories is missing creation of the extras folder
referenced later; add creation of $TARGET/extras alongside the other mkdir -p
lines so the later loop that copies DAILY_EXTRAS into $TARGET/extras/ (the code
that iterates over DAILY_EXTRAS) will succeed; update the same mkdir list that
contains $TARGET/skills, $TARGET/commands, $TARGET/agents, $TARGET/rules,
$TARGET/hooks, and $TARGET/skills/skill-library/references to also include
$TARGET/extras.
| TASK: Read extras in $ECC_ROOT/contexts/, $ECC_ROOT/mcp-configs/, guides and sort: | ||
|
|
||
| EXTRAS STRUCTURE: | ||
| - contexts/ — context files for various scenarios | ||
| - mcp-configs/ — Model Context Protocol server configs | ||
| - guides/ — documentation/guides | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify documented extras roots vs copy source path.
rg -n 'TASK: Read extras in \$ECC_ROOT/contexts/, \$ECC_ROOT/mcp-configs/, guides' skills/agent-sort/SKILL.md
rg -n 'cp "\$ECC_ROOT/extras/\$extra"' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 214
🏁 Script executed:
sed -n '380,410p' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 969
🏁 Script executed:
sed -n '470,485p' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 413
🏁 Script executed:
# Check if extras directory exists and its structure
find . -type d -name 'extras' 2>/dev/null | head -20Repository: affaan-m/everything-claude-code
Length of output: 57
🏁 Script executed:
rg -n 'DAILY_EXTRAS' skills/agent-sort/SKILL.md | head -20Repository: affaan-m/everything-claude-code
Length of output: 148
🏁 Script executed:
# Also search for where extras variable is assigned values
rg -n 'extras=' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 57
🏁 Script executed:
# Check the full structure and flow of the agent-sort skill
wc -l skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 105
🏁 Script executed:
# Search for where DAILY_EXTRAS gets populated
sed -n '400,480p' skills/agent-sort/SKILL.md | cat -nRepository: affaan-m/everything-claude-code
Length of output: 2407
🏁 Script executed:
# Also look for sections that handle reading from contexts, mcp-configs, guides
rg -n 'contexts/|mcp-configs/|guides/' skills/agent-sort/SKILL.md | head -30Repository: affaan-m/everything-claude-code
Length of output: 345
🏁 Script executed:
# Look for parsing logic that extracts DAILY_EXTRAS from agent output
sed -n '420,475p' skills/agent-sort/SKILL.md | cat -nRepository: affaan-m/everything-claude-code
Length of output: 1619
🏁 Script executed:
# Also check if there's any documentation about how DAILY_EXTRAS gets populated
rg -n 'DAILY_EXTRAS\|parse\|extract' skills/agent-sort/SKILL.md | head -15Repository: affaan-m/everything-claude-code
Length of output: 57
🏁 Script executed:
# Look at the full agent instruction to understand what output format is expected
sed -n '375,430p' skills/agent-sort/SKILL.md | cat -nRepository: affaan-m/everything-claude-code
Length of output: 1812
🏁 Script executed:
# Check if there's a LIBRARY section that shows how extras are used there
sed -n '480,520p' skills/agent-sort/SKILL.md | cat -nRepository: affaan-m/everything-claude-code
Length of output: 1382
🏁 Script executed:
# Check if there's a setup step that creates or populates $ECC_ROOT/extras/
sed -n '1,100p' skills/agent-sort/SKILL.md | cat -nRepository: affaan-m/everything-claude-code
Length of output: 4054
🏁 Script executed:
# Look for parsing logic that might extract the TYPE and reconstruct paths
sed -n '430,475p' skills/agent-sort/SKILL.md | cat -nRepository: affaan-m/everything-claude-code
Length of output: 1369
🏁 Script executed:
# Search for the parsing logic that extracts items from agent output
sed -n '450,480p' skills/agent-sort/SKILL.md | cat -nRepository: affaan-m/everything-claude-code
Length of output: 922
🏁 Script executed:
# Look for any reconstruction of paths from TYPE field
rg -n 'context|mcp-config|guide' skills/agent-sort/SKILL.md | grep -E '(if|case|TYPE)' | head -20Repository: affaan-m/everything-claude-code
Length of output: 221
🏁 Script executed:
# Look for any parsing/extraction logic that processes agent output
sed -n '420,480p' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 1317
🏁 Script executed:
# Check if there's a section that converts TYPE back to path
rg -n -A5 'EXTRA:|TYPE:|VERDICT:' skills/agent-sort/SKILL.md | head -50Repository: affaan-m/everything-claude-code
Length of output: 1109
🏁 Script executed:
# Look at the complete Step 4 section and any parsing instructions
sed -n '425,475p' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 1170
🏁 Script executed:
# Check if extras/ directory exists or if extras are in the documented subdirectories
ls -la /tmp/everything-claude-code/ 2>/dev/null | head -20Repository: affaan-m/everything-claude-code
Length of output: 57
🏁 Script executed:
# Check what actual directories exist in the repo
find . -maxdepth 1 -type d | sortRepository: affaan-m/everything-claude-code
Length of output: 323
🏁 Script executed:
# Verify the actual location of contexts, mcp-configs, guides
find . -type d \( -name contexts -o -name mcp-configs -o -name guides -o -name extras \) | head -10Repository: affaan-m/everything-claude-code
Length of output: 185
🏁 Script executed:
# Look for guides directory more specifically
find . -type d -name guidesRepository: affaan-m/everything-claude-code
Length of output: 97
🏁 Script executed:
# Check what's in assets/images/guides
ls -la ./assets/images/guides 2>/dev/null | head -20Repository: affaan-m/everything-claude-code
Length of output: 333
🏁 Script executed:
# Search for any reference to "guides" in the skill file itself
rg -n 'guides' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 366
🏁 Script executed:
# Check if there are any markdown files in contexts, mcp-configs explaining the format
ls contexts/ | head -10
ls mcp-configs/ | head -10Repository: affaan-m/everything-claude-code
Length of output: 120
🏁 Script executed:
# Look for examples in the SKILL.md of what agent output looks like
sed -n '595,620p' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 585
🏁 Script executed:
# Look for complete example of extras output in the skill file
sed -n '600,651p' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 1342
Fix extras copy command to match documented source structure — contexts, mcp-configs, and guides are in separate directories, not $ECC_ROOT/extras/.
Line 388 documents extras at $ECC_ROOT/contexts/, $ECC_ROOT/mcp-configs/, and guides/, but line 477 copies from $ECC_ROOT/extras/$extra. The agent output includes a TYPE field (context|mcp-config|guide) that must be used to reconstruct the correct source path. Without this, the copy will fail on actual extras like contexts/review.md or mcp-configs/mcp-servers.json.
Proposed fix
# DAILY Extras
for extra in $DAILY_EXTRAS; do
- cp "$ECC_ROOT/extras/$extra" "$TARGET/extras/"
+ # Parse TYPE from agent output and reconstruct path
+ case "$extra" in
+ *context*) cp "$ECC_ROOT/contexts/$extra" "$TARGET/extras/" ;;
+ *mcp-config*) cp "$ECC_ROOT/mcp-configs/$extra" "$TARGET/extras/" ;;
+ *guide*) cp "$ECC_ROOT/guides/$extra" "$TARGET/extras/" ;;
+ esac
doneOr store TYPE with each extra and use it during copy.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/agent-sort/SKILL.md` around lines 388 - 394, The copy step uses the
wrong source path for extras because it assumes all extras live under
$ECC_ROOT/extras/, but the agent output includes a TYPE field
(context|mcp-config|guide) and each extra actually lives under separate
directories; update the copy logic that references the variable extra to build
the source path using TYPE (e.g., $ECC_ROOT/{TYPE}/{extra}) or persist TYPE with
each extra and use it when constructing the cp/move source; look for the loop or
command that uses the variable extra and the TYPE field and change the source
construction accordingly so contexts, mcp-configs and guides are copied from
their respective directories.
| ```bash | ||
| # LIBRARY items to skill-library/references | ||
| LIBRARY_DIR="$TARGET/skills/skill-library/references" | ||
| mkdir -p "$LIBRARY_DIR" | ||
|
|
||
| for item in $LIBRARY_SKILLS $LIBRARY_COMMANDS $LIBRARY_AGENTS $LIBRARY_RULES $LIBRARY_HOOKS $LIBRARY_EXTRAS; do | ||
| # Copy based on item type (skill, command, etc.) | ||
| # Preserve directory structure | ||
| done | ||
| ``` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify missing executable copy logic in Step 5b.
rg -n -A8 -B2 'for item in \$LIBRARY_SKILLS \$LIBRARY_COMMANDS \$LIBRARY_AGENTS \$LIBRARY_RULES \$LIBRARY_HOOKS \$LIBRARY_EXTRAS; do' skills/agent-sort/SKILL.mdRepository: affaan-m/everything-claude-code
Length of output: 395
LIBRARY install step is non-functional (no copy logic implemented).
Step 5b defines the loop at lines 488–491 but performs no copy operation—only placeholder comments. LIBRARY references will never be populated.
Proposed fix
for item in $LIBRARY_SKILLS $LIBRARY_COMMANDS $LIBRARY_AGENTS $LIBRARY_RULES $LIBRARY_HOOKS $LIBRARY_EXTRAS; do
- # Copy based on item type (skill, command, etc.)
- # Preserve directory structure
+ case "$item" in
+ skills/*) cp -r "$ECC_ROOT/$item" "$LIBRARY_DIR/" ;;
+ commands/*) cp "$ECC_ROOT/$item" "$LIBRARY_DIR/" ;;
+ agents/*) cp "$ECC_ROOT/$item" "$LIBRARY_DIR/" ;;
+ rules/*) cp "$ECC_ROOT/$item" "$LIBRARY_DIR/" ;;
+ hooks/*) cp "$ECC_ROOT/$item" "$LIBRARY_DIR/" ;;
+ contexts/*|mcp-configs/*|guides/*) cp -r "$ECC_ROOT/$item" "$LIBRARY_DIR/" ;;
+ esac
done🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/agent-sort/SKILL.md` around lines 483 - 492, The loop that builds
LIBRARY references is a no-op; implement copy logic so items in LIBRARY_SKILLS,
LIBRARY_COMMANDS, LIBRARY_AGENTS, LIBRARY_RULES, LIBRARY_HOOKS and
LIBRARY_EXTRAS are actually copied into LIBRARY_DIR. Inside the for loop (the
block iterating over $LIBRARY_SKILLS $LIBRARY_COMMANDS $LIBRARY_AGENTS
$LIBRARY_RULES $LIBRARY_HOOKS $LIBRARY_EXTRAS) check that each $item exists and
then copy it preserving directory structure, e.g. use cp -a --parents "$item"
"$LIBRARY_DIR" (or rsync -a with equivalent flags), and skip empty/unset
variables to avoid errors; keep using LIBRARY_DIR and the existing mkdir -p
call.
| 1. Search this file for the item you need | ||
| 2. Copy from: `~/.claude/skills/skill-library/references/[item-name]/` | ||
| 3. Paste to: `~/.claude/skills/` | ||
| 4. Restart Claude Code |
There was a problem hiding this comment.
Router instructions should not hardcode ~/.claude paths.
Lines 532-533 assume user-level install, but Step 2 supports project-level (.claude). This can misroute users after project-level installs.
Proposed fix
-2. Copy from: `~/.claude/skills/skill-library/references/[item-name]/`
-3. Paste to: `~/.claude/skills/`
+2. Copy from: `$TARGET/skills/skill-library/references/[item-name]/`
+3. Paste to: `$TARGET/skills/`🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/agent-sort/SKILL.md` around lines 531 - 534, The router instructions
hardcode a user-home path (the lines that currently read
"~/.claude/skills/skill-library/references/[item-name]/" and
"~/.claude/skills/") which breaks project-level installs; update the steps to
avoid hardcoded home paths by replacing those literal paths with a configurable
placeholder (e.g., $CLAUDE_DIR or <claude_dir>) and add a short note that
$CLAUDE_DIR may point to either a project-level ".claude" or a user-level
"~/.claude"; ensure Step 2 and Step 3 reference the placeholder and include
one-line guidance on how users can set or detect $CLAUDE_DIR (project vs user)
so both install modes route correctly.
There was a problem hiding this comment.
7 issues found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/agent-sort/SKILL.md">
<violation number="1" location="skills/agent-sort/SKILL.md:55">
P1: User-facing installation instructions clone from an unvetted external GitHub repository, creating supply-chain risk and violating team policy.</violation>
<violation number="2" location="skills/agent-sort/SKILL.md:477">
P2: Installation step copies extras from $ECC_ROOT/extras, but earlier steps define extras as coming from contexts/, mcp-configs/, and guides. This inconsistency can cause missing files or copy failures.</violation>
<violation number="3" location="skills/agent-sort/SKILL.md:477">
P2: The install flow copies DAILY extras into `$TARGET/extras/` without first creating that directory, which can cause `cp` to fail and skip extras installation.</violation>
<violation number="4" location="skills/agent-sort/SKILL.md:489">
P0: The LIBRARY installation loop is a no-op right now, so non-daily items are never copied into `skill-library/references`. Add concrete copy logic for each item type inside this loop.</violation>
<violation number="5" location="skills/agent-sort/SKILL.md:521">
P2: Replace the literal placeholder text in the router template with generated library entries; otherwise `skill-library/SKILL.md` will not contain a usable index.</violation>
<violation number="6" location="skills/agent-sort/SKILL.md:543">
P2: Step 7 is currently a no-op, so stale language rules are never removed even though this step is part of the documented workflow.</violation>
</file>
<file name="commands/agent-sort.md">
<violation number="1" location="commands/agent-sort.md:59">
P2: New user-facing doc links to an external repository without indicating organizational vetting/approval, violating the project’s supply-chain safety review policy.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| mkdir -p "$LIBRARY_DIR" | ||
|
|
||
| for item in $LIBRARY_SKILLS $LIBRARY_COMMANDS $LIBRARY_AGENTS $LIBRARY_RULES $LIBRARY_HOOKS $LIBRARY_EXTRAS; do | ||
| # Copy based on item type (skill, command, etc.) |
There was a problem hiding this comment.
P0: The LIBRARY installation loop is a no-op right now, so non-daily items are never copied into skill-library/references. Add concrete copy logic for each item type inside this loop.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/agent-sort/SKILL.md, line 489:
<comment>The LIBRARY installation loop is a no-op right now, so non-daily items are never copied into `skill-library/references`. Add concrete copy logic for each item type inside this loop.</comment>
<file context>
@@ -0,0 +1,651 @@
+mkdir -p "$LIBRARY_DIR"
+
+for item in $LIBRARY_SKILLS $LIBRARY_COMMANDS $LIBRARY_AGENTS $LIBRARY_RULES $LIBRARY_HOOKS $LIBRARY_EXTRAS; do
+ # Copy based on item type (skill, command, etc.)
+ # Preserve directory structure
+done
</file context>
|
|
||
| ```bash | ||
| rm -rf /tmp/everything-claude-code | ||
| git clone https://github.com/affaan-m/everything-claude-code.git /tmp/everything-claude-code |
There was a problem hiding this comment.
P1: User-facing installation instructions clone from an unvetted external GitHub repository, creating supply-chain risk and violating team policy.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/agent-sort/SKILL.md, line 55:
<comment>User-facing installation instructions clone from an unvetted external GitHub repository, creating supply-chain risk and violating team policy.</comment>
<file context>
@@ -0,0 +1,651 @@
+
+```bash
+rm -rf /tmp/everything-claude-code
+git clone https://github.com/affaan-m/everything-claude-code.git /tmp/everything-claude-code
+```
+
</file context>
|
|
||
| ```bash | ||
| # Detect project languages from file extensions | ||
| # Remove rules for languages not detected in the project |
There was a problem hiding this comment.
P2: Step 7 is currently a no-op, so stale language rules are never removed even though this step is part of the documented workflow.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/agent-sort/SKILL.md, line 543:
<comment>Step 7 is currently a no-op, so stale language rules are never removed even though this step is part of the documented workflow.</comment>
<file context>
@@ -0,0 +1,651 @@
+
+```bash
+# Detect project languages from file extensions
+# Remove rules for languages not detected in the project
+```
+
</file context>
| ## Available Library Items | ||
|
|
||
| ### Skills | ||
| [List all LIBRARY skills with brief descriptions] |
There was a problem hiding this comment.
P2: Replace the literal placeholder text in the router template with generated library entries; otherwise skill-library/SKILL.md will not contain a usable index.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/agent-sort/SKILL.md, line 521:
<comment>Replace the literal placeholder text in the router template with generated library entries; otherwise `skill-library/SKILL.md` will not contain a usable index.</comment>
<file context>
@@ -0,0 +1,651 @@
+## Available Library Items
+
+### Skills
+[List all LIBRARY skills with brief descriptions]
+
+### Commands
</file context>
|
|
||
| # DAILY Extras | ||
| for extra in $DAILY_EXTRAS; do | ||
| cp "$ECC_ROOT/extras/$extra" "$TARGET/extras/" |
There was a problem hiding this comment.
P2: Installation step copies extras from $ECC_ROOT/extras, but earlier steps define extras as coming from contexts/, mcp-configs/, and guides. This inconsistency can cause missing files or copy failures.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/agent-sort/SKILL.md, line 477:
<comment>Installation step copies extras from $ECC_ROOT/extras, but earlier steps define extras as coming from contexts/, mcp-configs/, and guides. This inconsistency can cause missing files or copy failures.</comment>
<file context>
@@ -0,0 +1,651 @@
+
+# DAILY Extras
+for extra in $DAILY_EXTRAS; do
+ cp "$ECC_ROOT/extras/$extra" "$TARGET/extras/"
+done
+```
</file context>
|
|
||
| # DAILY Extras | ||
| for extra in $DAILY_EXTRAS; do | ||
| cp "$ECC_ROOT/extras/$extra" "$TARGET/extras/" |
There was a problem hiding this comment.
P2: The install flow copies DAILY extras into $TARGET/extras/ without first creating that directory, which can cause cp to fail and skip extras installation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/agent-sort/SKILL.md, line 477:
<comment>The install flow copies DAILY extras into `$TARGET/extras/` without first creating that directory, which can cause `cp` to fail and skip extras installation.</comment>
<file context>
@@ -0,0 +1,651 @@
+
+# DAILY Extras
+for extra in $DAILY_EXTRAS; do
+ cp "$ECC_ROOT/extras/$extra" "$TARGET/extras/"
+done
+```
</file context>
| ## See Also | ||
|
|
||
| - `configure-ecc` skill — Interactive manual installation wizard | ||
| - ECC repository: https://github.com/affaan-m/everything-claude-code |
There was a problem hiding this comment.
P2: New user-facing doc links to an external repository without indicating organizational vetting/approval, violating the project’s supply-chain safety review policy.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At commands/agent-sort.md, line 59:
<comment>New user-facing doc links to an external repository without indicating organizational vetting/approval, violating the project’s supply-chain safety review policy.</comment>
<file context>
@@ -0,0 +1,59 @@
+## See Also
+
+- `configure-ecc` skill — Interactive manual installation wizard
+- ECC repository: https://github.com/affaan-m/everything-claude-code
</file context>
|
Closing as superseded by #981 on the same branch (feat/agent-sort-skill). Keeping the newer PR as the active thread for this change. |
Implements issue #916
Summary by cubic
Adds the
agent-sortskill and/agent-sortcommand for evidence-based ECC installation that auto-sorts items into DAILY vs LIBRARY and builds a searchable library, reducing token overhead by ~60%. Implements Linear #916.~/.claudeor.claude; stores others inskills/skill-library/referencesand generatesskill-library/SKILL.md.commands/agent-sort.mdandskills/agent-sort/SKILL.md.Written for commit 7f10d23. Summary will update on new commits.
Summary by CodeRabbit
New Features
/agent-sortcommand to automatically analyze your codebase and categorize ECC components.Documentation
/agent-sortcommand and installation workflow.