- Home
- Skills
- Agents & Orchestration
- CLAUDE.md & AGENTS.md Pruner + Skill Trigger Check
Works with the AI Agents you already use
CLAUDE.md & AGENTS.md Pruner + Skill Trigger Check
Flags wrong and dead lines in CLAUDE.md/AGENTS.md/Cursor rules by file:line, checks them against the repo, then checks SKILL.md triggers.
$5
CLAUDE.md & AGENTS.md Pruner + Skill Trigger Check
Example session with this skill installed
[REAL public repo, run for this test: github.com/Dimillian/IceCubesApp at commit 98098b9c; rule files last changed in d8e46d28]
User: "Our CLAUDE.md and AGENTS.MD are 277 lines. Prune them and tell me what's wrong."
Script run: python3 agent-rules-pruner/scripts/lint.py /workspace/oss/IceCubesApp
Also checked by hand: ls Packages/, test target names in Packages/*/Package.swift, .swiftformat, AlternateIcons/, Packages/AppAccount/.../AppAccountsManager.swift, and a search of the Swift sources for getHomeTimeline.
- Read your context and instructions
- Compiled the claude md
Agent rules audit - IceCubesApp (98098b9c)
Summary: one 277-line CLAUDE.md (~2,274 tokens by the linter's rough count). AGENTS.MD is a symlink to it (commit 0513b2e8), so both names already point at the same text. It can become
one 25-line file (~374 tokens), with the symlink kept. The 3 fixes that matter: a test scheme that doesn't exist (NetworkTests), a hard-coded /Users/thomas/... project path, and a package list that's missing four packages and names one wrong.
Wrong or stale (fix first)
| File:line | Says | Repo actually has | Fix |
|---|---|---|---|
| CLAUDE.md:28 | test_sim scheme: "NetworkTests" | Test target is NetworkClientTests (Packages/NetworkClient/Package.swift) | Rename. An agent running this gets a "scheme not found" error |
| CLAUDE.md:26-30 | 5 test schemes | Also StatusKitTests exists | Add it, since StatusKit is where the post editor lives |
| CLAUDE.md:14, 23 | projectPath: "/Users/thomas/Documents/Dev/Open Source/IceCubesApp/..." | Only valid on one machine | Use <repo>/IceCubesApp.xcodeproj or a relative path |
| CLAUDE.md:14 vs 174 | build_sim_name_proj vs build_ios_sim_name_proj | Two different tool names for the same job; at most one matches the installed XcodeBuildMCP | Keep one (line 14's is used with session defaults). Check against the server's tool list |
| CLAUDE.md:39-49 | Packages: Models, Network, Env, DesignSystem, Account, Timeline, StatusKit, Notifications, MediaUI | Packages/ has NetworkClient (not Network) plus AppAccount, Conversations, Explore, Lists | Replace with the real list |
| CLAUDE.md:39 | packages under /Packages/ | Leading slash reads as filesystem root | Packages/ |
| CLAUDE.md:69 | "40+ app icons" | AlternateIcons/ has 3 entries in this checkout (icons may live in the asset catalog too) | Unverified. Drop the number; the agent doesn't need it |
| AGENTS.MD | symlink to CLAUDE.md | - | Fine as is: one file, two names. The linter reports it as a symlink, not a duplicate. Keep it |
Section verdicts
| Section (lines) | Verdict | Why |
|---|---|---|
| Title + intro (1-7) | Keep, shorten | One line is enough. The heading says "CLAUDE.md", but tools also read this file as AGENTS.MD |
| Build / tests (9-31) | Fix | Wrong scheme, missing scheme, personal paths |
| Formatting (33-34) | Keep | Repo-specific and checkable |
| Package structure (36-49) | Fix | Stale list |
| Key patterns, legacy (51-58) | Keep, merge | "No new ViewModels" is the most important rule in the file. It's stated 4 times (52, 81, 255, 273) |
| App extensions (60-64) | Keep, shorten | Useful map, one line |
| Implementation details (66-71) | Cut | Product description (privacy proxy, icons, DeepL), not instructions |
| Core philosophy (75-81) | Cut | "Embrace its declarative nature", "don't fight the framework": not checkable |
| State management, ownership (85-98) | Cut | The model already knows what @State and @Binding are |
| TimelineView example (100-137) | Move or cut | Generic sample code, not repo code: getHomeTimeline() appears nowhere in the Swift sources. Point to a real view instead |
| Async patterns (139-144) | Merge | Keep "no Combine for new code"; the rest is generic |
| Composition, organization (146-158) | Cut | Generic; line 156 "when appropriate" is uncheckable |
| Build verification (160-175) | Merge | The rule is good ("build, fix errors, run tests"); the example block duplicates 9-31 with a third command variant and a placeholder path |
| Implementation examples (177-241) | Cut | 65 lines of sample code. The AppAccountsManager sketch roughly matches the real class (Packages/AppAccount, @Observable, availableAccounts: [AppAccount]), but the agent can read the real one |
| Best practices DO / DON'T (243-261) | Merge | Keep only line 261 (don't nest @Observable), which is a real, specific pitfall |
| Testing strategy (263-269) | Cut | Generic |
| Code style when editing (271-277) | Merge | "Maintain existing patterns in legacy code" (272) conflicts with "no ViewModels" unless scoped. The proposed file says how |
Proposed file (CLAUDE.md, 25 lines, about 374 tokens by the same rough count)
Agent instructions
IceCubesApp: a Mastodon client in SwiftUI for iOS, iPadOS, macOS and visionOS.
Build and test (XcodeBuildMCP)
Use the project path of your own checkout.
mcp__XcodeBuildMCP__session-set-defaults projectPath: "<repo>/IceCubesApp.xcodeproj" simulatorName: "iPhone Air"
mcp__XcodeBuildMCP__build_sim_name_proj scheme: "IceCubesApp"
mcp__XcodeBuildMCP__test_sim scheme: "<Package>Tests"
Test schemes: AccountTests, EnvTests, ModelsTests, NetworkClientTests, StatusKitTests, TimelineTests.
After editing code: build, fix compile errors, and run the tests of any package you changed.
Formatting: SwiftFormat, 2-space indent, config in .swiftformat.
Layout
Swift packages in Packages/: Account, AppAccount, Conversations, DesignSystem, Env, Explore, Lists, MediaUI, Models, NetworkClient (Mastodon, DeepL and OpenAI clients), Notifications, StatusKit, Timeline.
Extensions: NotificationService (push decryption), Share, Action, Widgets.
How new code is written
- No new ViewModels. Views hold their state with
@Stateand aViewStateenum (loading / loaded / error), and load data in.task. - Shared services are
@Observableand injected with.environment(...). Don't nest@Observableobjects inside other@Observableobjects; it breaks observation. Create services at the view level. - async/await for all API calls; no Combine for new code.
- Legacy views that already use ViewModels: keep their pattern when making small fixes. Don't half-convert them.
AGENTS.MD stays a symlink to this file.
Skill trigger check
No SKILL.md files in the repo.
Not checked
- Which XcodeBuildMCP tool names your installed version exposes (run its tools list)
- Whether contributors rely on the long examples. If so, move them to
docs/swiftui-patterns.mdrather than delete - The
.swiftformatcontents (only that the file exists) - Whether every tool you use finds
AGENTS.MD(upper-case extension) on case-sensitive file systems; the usual name isAGENTS.md
Connects securely to your tools. The creator never sees your data.
About this skill
Checks your CLAUDE.md/AGENTS.md against the actual repo and your SKILL.md triggers in one pass, shown on two real public repos with every finding verified.
There are good free tools that lint rules files or skill descriptions separately. This one does both in one report, and verifies claims against the code instead of only checking the text.
- A bundled linter (standard library Python 3.9+, read-only, no network) inventories CLAUDE.md, AGENTS.md, .cursor/rules, copilot-instructions and every SKILL.md. It shows lines and rough tokens, identical files, symlinks, machine-specific /Users/... paths, vague rules, missing referenced paths and repeated lines.
- It treats audited files as data: lines like
curl ... | sh(includingbash <(curl ...),iwr ... | iexand commands split across lines), "ignore previous instructions", hidden HTML-comment instructions and invisible Unicode are reported for you to review, never followed. - The skill then verifies claims by hand: test schemes and scripts that don't exist, stale package lists, contradictions.
- Every section gets a verdict (Keep / Fix / Merge / Cut / Move) with a reason, and you get a proposed trimmed file.
- Skill trigger check: name format, the 1,024-character description limit, the missing "use when..." clause, first-person wording, bodies over ~500 lines, and overlapping skills, with before -> after descriptions.
Real example: on a public SwiftUI repo (277-line CLAUDE.md, with AGENTS.MD as a symlink to it) it found a test scheme that doesn't exist, a hard-coded personal path and a stale package list, and proposed a 25-line replacement. It's read-only by default and never deletes a rule without saying why.
Known limitations: the "use when" and first-person checks are regexes, and the security patterns catch common forms only. Treat flags as leads to read, not verdicts.
Not affiliated with Anthropic, OpenAI, Cursor or GitHub.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Requires manual confirmation for file edits. Cannot verify external API capabilities not documented in the local repo. Symlinks pointing outside the repo are ignored.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 21 days ago