Skip to content

feat(skills): add agent-sort skill for evidence-based ECC installation#965

Closed
BoyanCoding wants to merge 1 commit intoaffaan-m:mainfrom
BoyanCoding:feat/agent-sort-skill
Closed

feat(skills): add agent-sort skill for evidence-based ECC installation#965
BoyanCoding wants to merge 1 commit intoaffaan-m:mainfrom
BoyanCoding:feat/agent-sort-skill

Conversation

@BoyanCoding
Copy link
Copy Markdown

@BoyanCoding BoyanCoding commented Mar 27, 2026

Implements issue #916


Summary by cubic

Adds the agent-sort skill and /agent-sort command 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.

  • New Features
    • Runs 6 parallel agents to analyze the codebase and sort 291 ECC items (agents, skills, commands, rules, hooks, extras).
    • Installs DAILY items to ~/.claude or .claude; stores others in skills/skill-library/references and generates skill-library/SKILL.md.
    • Uses grep-based evidence for decisions, removes stale language rules, and prints before/after token savings.
    • Adds documentation at commands/agent-sort.md and skills/agent-sort/SKILL.md.

Written for commit 7f10d23. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Introduced /agent-sort command to automatically analyze your codebase and categorize ECC components.
    • Intelligently classifies agents, skills, commands, rules, hooks, and extras as daily-load (automatic) or on-demand reference content with zero token overhead.
  • Documentation

    • Added comprehensive guide for the /agent-sort command and installation workflow.

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)
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

📝 Walkthrough

Walkthrough

This PR introduces documentation and implementation for a new /agent-sort command that automatically analyzes a user's codebase and categorizes Everything Claude Code components into DAILY (automatic load) versus LIBRARY (on-demand reference) installations using evidence-driven classification via six parallel agents.

Changes

Cohort / File(s) Summary
Agent-Sort Documentation & Implementation
commands/agent-sort.md, skills/agent-sort/SKILL.md
Adds documentation and skill implementation for the new /agent-sort command. Detects user codebase tech stack, launches 6 parallel agents (agents, skills, commands, rules, hooks, extras), classifies ECC items as DAILY or LIBRARY, populates target directories (~/.claude or .claude), generates a searchable skill-library router, and cleans up temporary files. Includes verification steps and troubleshooting guidance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Suggested reviewers

  • affaan-m

Poem

🐰✨ A sorting spell so grand and bright,
Six agents dancing left and right,
Daily treasures, libraries deep,
Your codebase secrets now to keep! 📚🎯

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding an agent-sort skill for ECC installation, which is the primary focus of both added files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 27, 2026

Greptile Summary

This PR adds a new agent-sort skill and companion /agent-sort command that automates ECC installation by dispatching 6 parallel agents to grep the user's codebase and sort all 291 ECC items into DAILY (loaded every session) vs LIBRARY (on-demand, zero token cost) buckets. The concept is sound and the overall 9-step workflow is clearly structured, but two P1 implementation gaps prevent the feature from working correctly end-to-end.\n\nKey findings:\n\n- P1 — LIBRARY copy loop is unimplemented: Step 5b contains a for loop whose body is entirely placeholder comments. No LIBRARY items are ever written to skill-library/references/, making the library half of the feature a no-op.\n- P1 — Extras source path does not exist: Step 5a copies extras from $ECC_ROOT/extras/, but the ECC repository has no extras/ directory. Agent 6 correctly reads from contexts/, mcp-configs/, and guides/, but the subsequent copy commands reference a non-existent path.\n- P2 — Step 7 is a placeholder: The "Remove Stale Rules" step contains only two bash comments with no implementation.\n- P2 — Router SKILL.md has literal placeholders: The generated skill-library/SKILL.md template includes bracketed strings instead of agent instructions to populate them dynamically.\n- P2 — Missing "Both" installation level: The configure-ecc companion skill supports a "Both (user + project)" option that agent-sort omits.\n- P2 — Inconsistent item counts: "291 items" is stated throughout, but summing the per-category numbers yields ~317.

Confidence Score: 3/5

Not 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 $ECC_ROOT/extras/ doesn't exist in the ECC repo, causing all extras copy commands to fail. Both are directly on the advertised happy path of the skill, not edge cases.

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

Filename Overview
skills/agent-sort/SKILL.md New 651-line skill defining a 9-step parallel-agent ECC installer; contains two P1 gaps: the LIBRARY copy loop body is entirely placeholder comments (items never installed) and the extras source path does not exist in the repo. Step 7 is also unimplemented.
commands/agent-sort.md New slash command entry point for /agent-sort; clear and readable, but has minor item-count inconsistencies with skills/agent-sort/SKILL.md.

Reviews (1): Last reviewed commit: "feat(skills): add agent-sort skill for e..." | Re-trigger Greptile

Comment on lines +474 to +482

# DAILY Extras
for extra in $DAILY_EXTRAS; do
cp "$ECC_ROOT/extras/$extra" "$TARGET/extras/"
done
```

### 5b: Install LIBRARY Items

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Comment on lines +437 to +458
- `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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Comment on lines +570 to +575
Print summary:

```
## Agent Sort Installation Complete

### Installation Summary
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Comment on lines +150 to +166
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing "Both" installation level option vs configure-ecc

The companion configure-ecc skill offers three installation levels: "User-level", "Project-level", and "Both". The agent-sort skill only offers two options, which is a regression for users with mixed setups.

Comment on lines +497 to +532

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]/`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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)
---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Item count is inconsistent between files

The command description says "291 items" and lists "Hooks (24 scripts)". But SKILL.md says "Hooks (24 scripts + 15 lib)" and the per-category totals sum to ~317, not 291. The counts should be reconciled across both files.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8b6140d and 7f10d23.

📒 Files selected for processing (2)
  • commands/agent-sort.md
  • skills/agent-sort/SKILL.md

Comment on lines +21 to +27
## 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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
+## Examples

As 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.

Comment on lines +132 to +138
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
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 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.md

Repository: 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.md

Repository: 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 -30

Repository: 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.

Suggested change
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.

Comment on lines +388 to +394
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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.md

Repository: affaan-m/everything-claude-code

Length of output: 214


🏁 Script executed:

sed -n '380,410p' skills/agent-sort/SKILL.md

Repository: affaan-m/everything-claude-code

Length of output: 969


🏁 Script executed:

sed -n '470,485p' skills/agent-sort/SKILL.md

Repository: 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 -20

Repository: affaan-m/everything-claude-code

Length of output: 57


🏁 Script executed:

rg -n 'DAILY_EXTRAS' skills/agent-sort/SKILL.md | head -20

Repository: 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.md

Repository: 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.md

Repository: 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 -n

Repository: 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 -30

Repository: 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 -n

Repository: 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 -15

Repository: 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 -n

Repository: 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 -n

Repository: 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 -n

Repository: 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 -n

Repository: 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 -n

Repository: 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 -20

Repository: 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.md

Repository: 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 -50

Repository: 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.md

Repository: 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 -20

Repository: affaan-m/everything-claude-code

Length of output: 57


🏁 Script executed:

# Check what actual directories exist in the repo
find . -maxdepth 1 -type d | sort

Repository: 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 -10

Repository: affaan-m/everything-claude-code

Length of output: 185


🏁 Script executed:

# Look for guides directory more specifically
find . -type d -name guides

Repository: 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 -20

Repository: 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.md

Repository: 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 -10

Repository: 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.md

Repository: 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.md

Repository: 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
 done

Or 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.

Comment on lines +483 to +492
```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
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 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.md

Repository: 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.

Comment on lines +531 to +534
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-ai with guidance or docs links (including llms.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.)
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic


```bash
rm -rf /tmp/everything-claude-code
git clone https://github.com/affaan-m/everything-claude-code.git /tmp/everything-claude-code
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic


```bash
# Detect project languages from file extensions
# Remove rules for languages not detected in the project
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic

## Available Library Items

### Skills
[List all LIBRARY skills with brief descriptions]
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic


# DAILY Extras
for extra in $DAILY_EXTRAS; do
cp "$ECC_ROOT/extras/$extra" "$TARGET/extras/"
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic


# DAILY Extras
for extra in $DAILY_EXTRAS; do
cp "$ECC_ROOT/extras/$extra" "$TARGET/extras/"
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic

## See Also

- `configure-ecc` skill — Interactive manual installation wizard
- ECC repository: https://github.com/affaan-m/everything-claude-code
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic

@affaan-m
Copy link
Copy Markdown
Owner

Closing as superseded by #981 on the same branch (feat/agent-sort-skill). Keeping the newer PR as the active thread for this change.

@affaan-m affaan-m closed this Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants