extract
Skill40 starsChanged 7 months agoMITView on GitHub
Extracts patterns from existing source code into a structured system.md file — naming, state shape, navigation pattern, error handling, and component composition. Used as the first step inside /reverse-document and on its own when the team wants to capture undocumented conventions in a brownfield project.
37 other projects use a version of this.
Adopted by
Most recently taken up by
- kanap-hq/KANAPtheir own version, first seen Nov 8, 2026
- crocotaste/crocotaste-plugintheir own version, first seen Nov 1, 2026
- stoa-platform/stoatheir own version, first seen Nov 1, 2026
- nexmoe/DayBeetheir own version, first seen Nov 1, 2026
- actionbook/actionbooktheir own version, first seen Oct 25, 2026
- ryneivy/SKILLStheir own version, first seen Oct 20, 2026
Used with
Projects with it also use ai-act-readiness, c-level-agents and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Hussain-ElfalahSkillai-act-readiness
Also in 3 projects that use this
Hussain-ElfalahSkillc-level-agents
Also in 3 projects that use this
MicrosoftSkillinbox-setup
Set up the Inbox agent with recommended VS Code settings and gh CLI configuration
Also in 3 projects that use this
- +9 more from Hussain-Elfalah
Other versions37 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 37
- actionbook/actionbook★ 1.6ksame name
- talesofai/cohub★ 585same name
- educlopez/ui-craft★ 441same name
- nexmoe/DayBee★ 424same name
- nexmoe/eve★ 424same name
- Southclaws/storyden★ 348same name
- AkaraChen/aghub★ 271same name
- zacharyfmarion/openscad-studio★ 238same name
- jagrat7/linux-wallpaper-engine★ 227same name
- runxhq/runx★ 97same name
27 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository77 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- design/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- adoptSkill
- architecture-decisionSkill
- architecture-reviewSkill
- asset-auditSkill
- asset-specSkill
- balance-checkSkill
- brainstormSkill
- bug-reportSkill
- bug-triageSkill
- changelogSkill
- code-reviewSkill
- consistency-checkSkill
- content-auditSkill
- create-architectureSkill
- create-control-manifestSkill
- create-epicsSkill
- create-storiesSkill
- day-one-patchSkill
- design-bibleSkill
- design-reviewSkill
- design-systemSkill
- dev-storySkill
- estimateSkill
- gate-checkSkill
- helpSkill
- hotfixSkill
- launch-checklistSkill
- localizeSkill
- map-systemsSkill
- milestone-reviewSkill
- onboardSkill
- patch-notesSkill
- perf-profileSkill
- prd-reviewSkill
- project-stage-detectSkill
- propagate-design-changeSkill
- prototypeSkill
- qa-planSkill
- quick-designSkill
- regression-suiteSkill
- release-checklistSkill
- retrospectiveSkill
- reverse-documentSkill
- review-all-prdsSkill
- scope-checkSkill
- security-auditSkill
- setup-frameworkSkill
- skill-improveSkill
- skill-testSkill
- smoke-checkSkill
- soak-testSkill
- sprint-planSkill
- sprint-statusSkill
- startSkill
- story-doneSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 35 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
If no path was passed, ask:
- Distinctive: line 49
Use Glob to confirm the target exists and resolve to a list of files.
- Distinctive: line 57
Read each file. For each, classify by role: screen, component, hook/composable, store, service, util, type definition, test.
- Distinctive: line 66
Do not summarize each file in the output — the goal is the cross-file pattern.
- Distinctive: line 117
Test framework actually used
- Very specific: line 197
Ask: "May I write this to design/extracted/<system>.md?"
- Distinctive: line 203
After writing, suggest one of:
“Common” is measured: kept by at least 6 in 10 of the 35 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Extract — Code Pattern Capture
Reads existing implementation and produces a system.md describing how the code is actually built — not how it should be. This is descriptive, not prescriptive.
Output: design/extracted/<system-or-area>.md
Purpose / When to Run
Run when:
- A brownfield project has working code but no design docs
/reverse-documentis running and needs the extracted patterns as input- The team wants a "this is how we currently do it" snapshot before making a change
Distinct from /design-system (which authors a forward-looking PRD) and /architecture-decision (which records a deliberate decision). This skill captures observed reality so a future PRD or ADR can be written against an honest baseline.
Inputs
- Required: a path or glob pointing to the source files to analyze (e.g.,
src/screens/auth/,lib/features/onboarding/**/*.dart) - The framework (read from
.claude/docs/technical-preferences.md)
Outputs
design/extracted/<system-name>.md
Phase 1: Resolve Scope
If no path was passed, ask:
- Prompt: "Which area of code should I extract patterns from?"
- Options:
Screens / pages—src/screens/**,lib/features/**,app/Sources/**/Views/State management— wherever the app's stores / view models liveNetworking / API client— fetchers, interceptorsNavigation— routing config, deep linksSpecific subdirectory— free text path
Use Glob to confirm the target exists and resolve to a list of files. Cap at ~50 files for one extraction; if more, sample and ask whether to chunk.
Determine the system name from the path (e.g., src/screens/auth/ → auth).
Phase 2: Read & Skim
Read each file. For each, classify by role: screen, component, hook/composable, store, service, util, type definition, test.
While reading, build a fact table per file:
- Imports (which dependencies and from where)
- Exported names
- State shape (if a store)
- Side effects (network calls, persistence reads/writes, navigation)
- Error handling pattern
Do not summarize each file in the output — the goal is the cross-file pattern.
Phase 3: Identify Patterns
Group findings into pattern categories:
3a: Naming
- File naming:
kebab-case.tsx,PascalCase.swift, etc. - Component naming:
<ScreenName>Screen.tsx,<Feature>Page.dart - State naming:
useAuthStore,AuthViewModel,AuthBloc - Hooks/composables:
useX,with<X>
3b: State management
What library or pattern shows up:
- React Native: Redux, Zustand, Jotai, MobX, Context+useReducer
- Flutter: Provider, Riverpod, BLoC, GetX
- iOS native: ObservableObject, TCA, Combine, Redux-style
- Android native: ViewModel + StateFlow, MVI, Compose state
Capture how state is shaped (entity vs. ui state, normalized vs. nested), and where mutations happen.
3c: Navigation
- Library: React Navigation, Expo Router, GoRouter, NavigationStack, Compose Navigation, etc.
- Pattern: stack / tab / drawer / mixed
- Deep-link handling: present? where?
- Auth-gated routes: pattern used
3d: Networking
- Client library: fetch, Axios, Dio, URLSession, Ktor, Retrofit
- Auth: token in headers, biometric refresh, etc.
- Error handling: thrown / Result type / sealed class
3e: Error & loading states
- How does code handle network failures, timeouts, validation errors
- Where do loading indicators live (per-screen, global, hooked into store)
3f: Persistence
- Local storage: AsyncStorage, MMKV, SharedPreferences, UserDefaults, Hive, Drift, SwiftData
- Secure storage: Keychain, EncryptedSharedPreferences, react-native-keychain
- Cache invalidation: pattern observed
3g: Testing
- Test framework actually used
- Files-with-tests vs. files-without — count
3h: Dependencies
- Top 10 third-party deps from package.json / pubspec.yaml / Podfile / build.gradle
Phase 4: Spot Inconsistencies
The point of extraction is to surface drift. For each pattern category, note where the codebase disagrees with itself:
- "12 screens use
useAuthStore, 3 useuseContext(AuthContext)directly." - "8 services throw on error; 2 return
Result<T, E>." - "Most screens have a
Loadingstate; 4 do not."
Inconsistencies are not bugs — they are evidence the team has not made a decision. List each one for the eventual ADR.
Phase 5: Draft system.md
Write design/extracted/<system-name>.md:
# Extracted Patterns: <System Name>
> **Status**: Descriptive (not prescriptive)
> **Source path**: <glob>
> **Files analyzed**: <count>
> **Extracted on**: <date>
> **Framework**: <name + version from technical-preferences.md>
## 1. Summary
[3-4 sentences describing what this code does, in plain terms.]
## 2. Naming Patterns
- Files: <observed convention>
- Components: <observed convention>
- State: <observed convention>
- Tests: <observed convention>
[Note any inconsistencies.]
## 3. State Management
- Library: <name>
- Shape: <entity-first / ui-first / mixed>
- Mutation pattern: <where mutations occur>
- Example: <one short snippet showing the dominant pattern, paraphrased>
## 4. Navigation
- Library: <name>
- Top-level structure: <stack / tabs / drawer / mixed>
- Deep links: <present | not present>
- Auth gating: <pattern>
## 5. Networking
- Client: <library>
- Auth handling: <pattern>
- Error handling: <pattern>
## 6. Loading & Error States
- Loading: <pattern + where it lives>
- Error: <pattern + where it lives>
- Empty: <pattern, if observable>
## 7. Persistence
- Local: <library>
- Secure: <library or "none">
## 8. Testing
- Framework: <name>
- Coverage observation: <X of Y files have tests>
## 9. Inconsistencies Worth Resolving
- [list — each becomes a candidate ADR or PRD note]
## 10. Open Questions
- [things the code does not make obvious — invitation for the team to clarify]Ask: "May I write this to design/extracted/<system>.md?"
Phase 6: Hand-off Suggestion
After writing, suggest one of:
/reverse-document <system>— generate a forward-looking PRD or architecture doc on top of this extraction/architecture-decision <inconsistency>— record a decision for one of the surfaced drifts/design-system retrofit design/prd/<system>.md— if a partial PRD exists, fill it from the extraction
Examples
/extract src/screens/onboarding/
- 18 files: 6 screens, 4 hooks, 2 stores, 3 services, 3 types
- State: Zustand
- Navigation: React Navigation v6, stack inside a tab
- Inconsistency: 5 screens use
useAuthStore, 1 still uses Context API directly - Output:
design/extracted/onboarding.md
/extract lib/features/auth/
- Flutter project, Riverpod state, GoRouter navigation
- Inconsistency: 2 services use
Result<T, AppError>, 1 still throws - Output:
design/extracted/auth.md
Quality Gates
- Output must be descriptive, not prescriptive — no "should" language.
- Inconsistencies section must list at least one item or explicitly state "no observed inconsistencies."
- File counts in the doc must match the glob result — no inflated numbers.
- The doc must not invent abstractions the code does not have. If code is messy, the doc says so.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

