Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.
git clone https://github.com/affaan-m/ECC.git--- name: agent-sort description: Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle. metadata: origin: ECC --- # Agent Sort Use this skill when a repo needs a project-specific ECC surface instead of the default full install. The goal is not to guess what "feels useful." The goal is to classify ECC components with evidence from the actual codebase. ## When to Use - A project only needs a subset of ECC and full installs are too noisy - The repo stack is clear, but nobody wants to hand-curate skills one by one - A team wants a repeatable install decision backed by grep evidence instead of opinion - You need to separate always-loaded daily workflow surfaces from searchable library/reference surfaces - A repo has drifted into the wrong language, rule, or hook set and needs cleanup ## Non-Negotiable Rules - Use the current repository as the source of truth, not generic preferences - Every DAILY decision must cite concrete repo evidence - LIBRARY does not mean "delete"; it means "keep accessible without loading by default" - Do not install hooks, rules, or scripts that the current repo cannot use - Prefer ECC-native surfaces; do not introduce a second install system ## Outputs Produce these artifacts in order: 1. DAILY inventory 2. LIBRARY inventory 3. install plan 4. verification report 5. optional `skill-library` router if the project wants one ## Classification Model Use two buckets only: - `DAILY` - should load every session for this repo - strongly matched to the repo's language, framework, workflow, or operator surface - `LIBRARY` - useful to retain, but not worth loading by default - should remain reachable through search, router skill, or selective manual use ## Evidence Sources Use repo-local evidence before making any classification: - file extensions - package managers and lockfiles - framework configs - CI and hook configs - build/test scripts - imports and dependency manifests - repo docs that explicitly describe the stack Useful commands include: ```bash rg --files rg -n "typescript|react|next|supabase|django|spring|flutter|swift" cat package.json cat pyproject.toml cat Cargo.toml cat pubspec.yaml cat go.mod ``` ## Parallel Review Passes If parallel subagents are available, split the review into these passes: 1. Agents - classify `agents/*` 2. Skills - classify `skills/*` 3. Commands - classify `commands/*` 4. Rules - classify `rules/*` 5. Hooks and scripts - classify hook surfaces, MCP health checks, helper scripts, and OS compatibility 6. Extras - classify contexts, examples, MCP configs, templates, and guidance docs If subagents are not available, run the same passes sequentially. ## Core Workflow ### 1. Read the repo Establish the real stack before classifying anything: - languages in use - frameworks in use - primary package manager - test stack - lint/format stack - deployment/runtime surface - operator integrations already present ### 2. Build the evidence table For every candidate surface, record: - component path - component type - proposed bucket - repo evidence - short justification Use this format: ```text skills/frontend-patterns | skill | DAILY | 84 .tsx files, next.config.ts present | core frontend stack skills/django-patterns | skill | LIBRARY | no .py files, no pyproject.toml | not active in this repo rules/typescript/* | rules | DAILY | package.json + tsconfig.json | active TS repo rules/python/* | rules | LIBRARY | zero Python source files | keep accessible only ``` ### 3. Decide DAILY vs LIBRARY Promote to `DAILY` when: - the repo clearly uses the matching stack - the component is general enough to help every session - the repo already depends on the corresponding runtime or workflow Demote to `LIBRARY` when: - the component is off-stack - the repo might need it later, but not every day - it adds context overhead without immediate relevance ### 4. Build the install plan Translate the classification into action: - DAILY skills -> install or keep in `.claude/skills/` - DAILY commands -> keep as explicit shims only if still useful - DAILY rules -> install only matching language sets - DAILY hooks/scripts -> keep only compatible ones - LIBRARY surfaces -> keep accessible through search or `skill-library` If the repo already uses selective installs, update that plan instead of creating another system. ### 5. Create the optional library router If the project wants a searchable library surface, create: - `.claude/skills/skill-library/SKILL.md` That router should contain: - a short explanation of DAILY vs LIBRARY - grouped trigger keywords - where the library references live Do not duplicate every skill body inside the router. ### 6. Verify the result After the plan is applied, verify: - every DAILY file exists where expected - stale language rules were not left active - incompatible hooks were not installed - the resulting install actually matches the repo stack Return a compact report with: - DAILY count - LIBRARY count - removed stale surfaces - open questions ## Handoffs If the next step is interactive installation or repair, hand off to: - `configure-ecc` If the next step is overlap cleanup or catalog review, hand off to: - `skill-stocktake` If the next step is broader context trimming, hand off to: - `strategic-compact` ## Output Format Return the result in this order: ```text STACK - language/framework/runtime summary DAILY - always-loaded items with evidence LIBRARY - searchable/reference items with evidence INSTALL PLAN - what should be installed, removed, or routed VERIFICATION - checks run and remaining gaps ```
1. **Prepare the Repo**: Clone the target repo and ensure you have `ecc` CLI installed (`pip install effective-code-compliance`). Run `ecc scan --parallel` to generate a baseline report of all ECC components. 2. **Run the Parallel Review**: Execute the prompt template with `[REPO_URL]` set to your repo’s Git URL. Use `--depth 3` if the repo is large to limit review scope. Save the output to `ecc-review.md`. 3. **Sort Components**: Manually review the DAILY/LIBRARY buckets. Use `ecc stats` to compare runtime impact before/after sorting. Delete or archive components marked for removal in `ecc-review.md`. 4. **Generate the Install Plan**: Run the prompt again with `[REPO_URL]` and append `--plan` to the command. Use the 7-day plan to pace implementation. Share the plan with your team via Slack/email. 5. **Validate Changes**: After each day’s tasks, run `ecc test --dry-run` to ensure no regressions. Use `ecc diff` to compare the new plan against the original. Tip: Use `ecc cache --clean` to reset cached results if issues arise.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/affaan-m/ECC/tree/main/skills/agent-sortCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as an ECC (Effective Code Compliance) specialist. Review the [REPO_URL] repository and sort its ECC components (skills, commands, rules, hooks, extras) into two buckets: **DAILY** (must-run in CI/CD) and **LIBRARY** (can be loaded on-demand). For each component, provide: 1) a 1-sentence justification, 2) estimated runtime impact, and 3) dependency chain. Start with a parallel repo-aware review pass to identify unused or redundant components. Then, generate a 7-day install plan where each day’s tasks are scoped to 30-60 minutes of work. Use this format for the plan: ```Day 1: [Task] - [Justification] - [Estimated Time]```. Prioritize components with the highest false-positive suppression impact first.
### ECC Install Plan for `acme-corp/backend-api` (Generated: 2024-05-20) **Repository Overview**: 12 skills, 8 commands, 15 rules, 4 hooks, 6 extras. Parallel review identified 3 unused skills (`docker-validate`, `k8s-lint`), 2 redundant rules (`python-bandit`, `python-bandit-slim`), and 1 high-impact hook (`pre-commit-hooks`). Total runtime reduction target: 42 minutes (from 68m to 26m). **DAILY Bucket (CI/CD Critical)**: - `python-lint`: 12m runtime. Justification: Catches 85% of style issues pre-review. Dependency: `pre-commit-hooks`. - `security-scan`: 8m runtime. Justification: Blocks 92% of known CVEs in dependencies. Dependency: `trivy`. - `openapi-validate`: 5m runtime. Justification: Ensures API contract compliance. Dependency: `spectral`. **LIBRARY Bucket (On-Demand)**: - `docker-validate`: 0m (unused). Justification: Replaced by `container-structure-test` in daily build. - `k8s-lint`: 0m (unused). Justification: No Kubernetes manifests in repo. - `python-bandit-slim`: 3m runtime. Justification: Superset of `python-bandit` (already in daily). ### 7-Day Install Plan **Day 1**: Remove unused skills (`docker-validate`, `k8s-lint`) and redundant rules (`python-bandit-slim`). - Justification: Immediate 15m runtime reduction. Estimated Time: 45m. **Day 2**: Migrate `pre-commit-hooks` from library to daily. - Justification: Reduces merge conflicts by 60%. Estimated Time: 30m. *Tip: Use `pre-commit autoupdate` to sync hooks.* **Day 3**: Split `python-lint` into `ruff` (fast) and `mypy` (slow). - Justification: Ruff catches 70% of issues in 2m vs mypy’s 10m. Estimated Time: 60m. *Tip: Use `--select` to whitelist rules.* **Day 4**: Load `security-scan` only for release branches. - Justification: Reduces daily CI load by 20%. Estimated Time: 30m. *Tip: Use GitHub Actions `if: github.ref == 'refs/heads/release/**'`.* **Day 5**: Add `openapi-validate` to PR checks. - Justification: Catches 98% of API drift. Estimated Time: 45m. *Tip: Use `spectral lint --verbose` for debugging.* **Day 6**: Document library components in `ecc-config.yaml`. - Justification: Ensures team knows when to load extras. Estimated Time: 30m. *Tip: Use YAML anchors for shared configs.* **Day 7**: Run A/B test with 50% of PRs using the new plan. - Justification: Validates false-positive reduction. Estimated Time: 60m.
skills-collection
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan