|
| 1 | +# fallow-skills |
| 2 | + |
| 3 | +[](https://opensource.org/licenses/MIT) |
| 4 | +[](https://github.com/fallow-rs/fallow-skills/actions/workflows/validate.yml) |
| 5 | + |
| 6 | +Agent skills for finding and removing dead code, unused dependencies, and code duplication in JavaScript/TypeScript projects using [fallow](https://github.com/fallow-rs/fallow). Works with any agent that supports the [Agent Skills](https://agentskills.io) specification — Claude Code, Cursor, OpenAI Codex, Windsurf, GitHub Copilot, Gemini CLI, Amp, and more. |
| 7 | + |
| 8 | +## Features |
| 9 | + |
| 10 | +- **11 dead code issue types** — unused files, exports, dependencies, types, enum/class members, and more |
| 11 | +- **4 duplication detection modes** — strict, mild, weak, and semantic clone detection |
| 12 | +- **Step-by-step workflows** for CI setup, monorepo analysis, migration, and incremental adoption |
| 13 | +- **Gotcha documentation** covering agent-specific pitfalls and correct usage patterns |
| 14 | +- **Companion skill** to the [fallow](https://github.com/fallow-rs/fallow) CLI and [fallow-docs](https://docs.fallow.tools) |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +Fallow must be installed in the target project. The fastest way: |
| 19 | + |
| 20 | +```bash |
| 21 | +npm install -g fallow |
| 22 | +``` |
| 23 | + |
| 24 | +Or run without installing: |
| 25 | + |
| 26 | +```bash |
| 27 | +npx fallow check |
| 28 | +``` |
| 29 | + |
| 30 | +See the [fallow installation guide](https://docs.fallow.tools/installation) for all options. |
| 31 | + |
| 32 | +## Installation |
| 33 | + |
| 34 | +### Claude Code |
| 35 | + |
| 36 | +```bash |
| 37 | +/install fallow-rs/fallow-skills |
| 38 | +``` |
| 39 | + |
| 40 | +### Cursor |
| 41 | + |
| 42 | +Clone into Cursor's skills directory: |
| 43 | + |
| 44 | +```bash |
| 45 | +git clone https://github.com/fallow-rs/fallow-skills.git ~/.cursor/skills/fallow-skills |
| 46 | +``` |
| 47 | + |
| 48 | +### OpenAI Codex |
| 49 | + |
| 50 | +Clone into the Codex skills directory: |
| 51 | + |
| 52 | +```bash |
| 53 | +git clone https://github.com/fallow-rs/fallow-skills.git ~/.agents/skills/fallow-skills |
| 54 | +``` |
| 55 | + |
| 56 | +### Windsurf |
| 57 | + |
| 58 | +Clone into the Windsurf skills directory: |
| 59 | + |
| 60 | +```bash |
| 61 | +git clone https://github.com/fallow-rs/fallow-skills.git ~/.codeium/windsurf/skills/fallow-skills |
| 62 | +``` |
| 63 | + |
| 64 | +### GitHub Copilot / VS Code |
| 65 | + |
| 66 | +Clone into your project or user skills directory: |
| 67 | + |
| 68 | +```bash |
| 69 | +git clone https://github.com/fallow-rs/fallow-skills.git ~/.agents/skills/fallow-skills |
| 70 | +``` |
| 71 | + |
| 72 | +### Gemini CLI |
| 73 | + |
| 74 | +```bash |
| 75 | +gemini skills install https://github.com/fallow-rs/fallow-skills.git |
| 76 | +``` |
| 77 | + |
| 78 | +### Amp |
| 79 | + |
| 80 | +Clone into the Amp skills directory: |
| 81 | + |
| 82 | +```bash |
| 83 | +git clone https://github.com/fallow-rs/fallow-skills.git ~/.config/agents/skills/fallow-skills |
| 84 | +``` |
| 85 | + |
| 86 | +### Other Agents |
| 87 | + |
| 88 | +Clone or copy the skill directory into your agent's skills location. This skill follows the open [Agent Skills](https://agentskills.io) specification and works with any compatible agent. |
| 89 | + |
| 90 | +## Available Skills |
| 91 | + |
| 92 | +| Skill | Description | |
| 93 | +|---|---| |
| 94 | +| [fallow-analysis](fallow-analysis/) | Find dead code, unused dependencies, and code duplication in JS/TS projects | |
| 95 | + |
| 96 | +## What's Included |
| 97 | + |
| 98 | +### fallow-analysis |
| 99 | + |
| 100 | +Covers all fallow CLI commands for dead code and duplication analysis: |
| 101 | + |
| 102 | +| Category | Key Operations | |
| 103 | +|---|---| |
| 104 | +| Dead Code Detection | Find unused files, exports, types, dependencies, enum/class members | |
| 105 | +| Duplication Detection | Find code clones with 4 detection modes (strict, mild, weak, semantic) | |
| 106 | +| Auto-Fix | Remove unused exports and dependencies with dry-run preview | |
| 107 | +| CI Integration | GitHub Actions, SARIF upload, baseline comparison, PR-scoped checks | |
| 108 | +| Migration | Auto-migrate from knip and jscpd configurations | |
| 109 | +| Monorepo Support | Per-workspace analysis with cross-package resolution | |
| 110 | +| Debugging | Trace export usage chains, file edges, and dependency usage | |
| 111 | + |
| 112 | +### Reference Documentation |
| 113 | + |
| 114 | +Each skill includes structured reference files: |
| 115 | + |
| 116 | +- **[CLI Reference](fallow-analysis/references/cli-reference.md)** — complete command and flag specifications, output formats, config file format |
| 117 | +- **[Gotchas](fallow-analysis/references/gotchas.md)** — common pitfalls, edge cases, and correct usage patterns |
| 118 | +- **[Patterns](fallow-analysis/references/patterns.md)** — workflow recipes for CI, monorepos, migration, incremental adoption, and more |
| 119 | + |
| 120 | +## Example Prompts |
| 121 | + |
| 122 | +Once installed, you can use natural language: |
| 123 | + |
| 124 | +- "Find all dead code in this project" |
| 125 | +- "Are there any unused dependencies?" |
| 126 | +- "Find code duplication in the codebase" |
| 127 | +- "Clean up unused exports" |
| 128 | +- "Set up a CI check for dead code" |
| 129 | +- "Migrate my knip config to fallow" |
| 130 | +- "Why is this export flagged as unused?" |
| 131 | +- "Check if this PR introduces dead code" |
| 132 | +- "Find unused files in the payments package" |
| 133 | + |
| 134 | +## Contributing |
| 135 | + |
| 136 | +See [CLAUDE.md](CLAUDE.md) for repository structure, skill creation guidelines, and quality standards. |
| 137 | + |
| 138 | +## Related |
| 139 | + |
| 140 | +- [fallow](https://github.com/fallow-rs/fallow) — The Rust-native dead code analyzer |
| 141 | +- [fallow-docs](https://docs.fallow.tools) — Official documentation |
| 142 | +- [fallow VS Code extension](https://marketplace.visualstudio.com/items?itemName=fallow.fallow-vscode) — Real-time dead code diagnostics in your editor |
| 143 | + |
| 144 | +## License |
| 145 | + |
| 146 | +MIT — see [LICENSE](LICENSE) for details. |
0 commit comments