code-correlator
Skill0 starsChanged 8 months agoMITView on GitHub
Map UI features discovered by app-explorer and documented by feature-mapper to their source code locations. Finds component files, handler functions, and related code for each feature. Optional skill - pipeline can skip from feature-mapper directly to mcp-tool-generator. Use when asked to: find feature in code, map UI to code, where is this button in the code, correlate interface to source, find component for, test this feature.
In this repository3 other files it gives its agents.
- app-explorerSkill
- feature-mapperSkill
- mcp-tool-generatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 13 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Check whether local application source code is present by looking for common roots such as src/, app/, pages/, or components/.
- Distinctive: line 13
If no source code is found, do not fail.
- Very specific: line 17
If source code is found, detect framework signals from project files such as package.json, tsconfig.json, vite.config.*, next.config.*, …
- Very specific: line 18
If framework detection is unclear, set framework to unknown and continue with generic strategies.
- Very specific: line 21
Read references/framework-hints.md for framework detection and file/layout patterns.
- Very specific: line 22
Read references/component-discovery.md for ordered correlation strategies.
- Very specific: line 23
Read references/test-patterns.md for optional behavior verification.
- Very specific: line 24
Read references/output-format.md for output schema and required fields.
- Very specific: line 34
Use references/framework-hints.md to classify project as one of: react, vue, angular, svelte, vanilla, or unknown.
- Distinctive: line 35
Prefer explicit config and dependencies over heuristic extension-only detection.
- Distinctive: line 45
Do not assume any tool provider naming or hardcoded prefixes.
- Very specific: line 59
Follow the exact structure defined in references/output-format.md.
- Distinctive: line 64
If confidence remains unclear, keep mapping but set conservative confidence and notes.
- Very specific: line 67
Write artifacts to .claude/artifacts/code-map-{timestamp}/.
- Very specific: line 68
Ensure schema compatibility with references/output-format.md.
- Distinctive: line 78
Search for UI element labels/headings from feature metadata.
- Distinctive: line 79
Use text matches to find candidate files, then filter by framework-relevant file types.
- Distinctive: line 86
When language server support exists, resolve symbol definitions and references to improve precision.
- Distinctive: line 87
If unavailable, skip cleanly and continue with non-LSP methods.
- Distinctive: line 95
No source code found: skip code correlation and return the prerequisite message.
- Distinctive: line 101
Do not modify application source code.
- Distinctive: line 102
Do not run the application.
- Distinctive: line 103
Do not trace full architecture.
- Distinctive: line 104
Keep call-chain analysis shallow (1-2 levels maximum).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Correlator
Overview
This skill takes a feature map produced by feature-mapper and correlates each UI feature with the source code that implements it. It maps features to component files, handler functions, and related files that are useful for downstream tool generation. This skill is optional: the pipeline can go directly from feature-mapper to mcp-tool-generator when source correlation is not needed.
Prerequisites Check
- Check whether local application source code is present by looking for common roots such as
src/,app/,pages/, orcomponents/. - If no source code is found, do not fail. Inform the user exactly:
"This skill requires access to the application's source code. You can skip this skill and proceed directly to mcp-tool-generator using the feature map."
- If source code is found, detect framework signals from project files such as
package.json,tsconfig.json,vite.config.*,next.config.*,nuxt.config.*,angular.json, andsvelte.config.*. - If framework detection is unclear, set framework to
unknownand continue with generic strategies.
Reference Loading
- Read
references/framework-hints.mdfor framework detection and file/layout patterns. - Read
references/component-discovery.mdfor ordered correlation strategies. - Read
references/test-patterns.mdfor optional behavior verification. - Read
references/output-format.mdfor output schema and required fields.
Correlation Workflow
Step 1: Load Feature Map
- Primary source: latest artifact under
.claude/artifacts/feature-map-*/. - Fallback source: manually supplied feature map input.
- Preserve
feature_idvalues exactly as provided; downstream consumers rely on exact ID stability.
Step 2: Detect Framework
- Use
references/framework-hints.mdto classify project as one of:react,vue,angular,svelte,vanilla, orunknown. - Prefer explicit config and dependencies over heuristic extension-only detection.
Step 3: Correlate Each Feature (ordered strategies)
Apply discovery strategies in order from references/component-discovery.md:
- URL path match
- Text search
- Component search
- LSP reference tracing (when available)
Do not assume any tool provider naming or hardcoded prefixes. Use available search/LSP capabilities in the current environment.
Step 4: Record Mapping
For each successful match, record:
feature_idcomponent_filehandler_functionline_rangeframework_detecteddiscovery_methodconfidencerelated_filestest_result
Follow the exact structure defined in references/output-format.md.
Step 5: Optional Verification
- Optionally verify behavior by reading handler code and doing shallow trace checks according to
references/test-patterns.md. - Hard cap tracing to one or two call levels.
- If confidence remains unclear, keep mapping but set conservative confidence and notes.
Step 6: Save Output
- Write artifacts to
.claude/artifacts/code-map-{timestamp}/. - Ensure schema compatibility with
references/output-format.md. - Include both mapped and unmapped features.
Strategy Details for Each Feature
1) URL Path Match
- Convert feature URL paths into likely route/component files.
- Example:
/admin/users-> likelypages/admin/users.*orapp/admin/users/page.*.
2) Text Search
- Search for UI element labels/headings from feature metadata.
- Use text matches to find candidate files, then filter by framework-relevant file types.
3) Component Search
- Convert feature names into candidate component/function names.
- Validate candidates by checking if file logic and UI structure match the feature intent.
4) LSP References
- When language server support exists, resolve symbol definitions and references to improve precision.
- If unavailable, skip cleanly and continue with non-LSP methods.
Confidence Levels
- High: LSP reference found, or exact route/component file match that clearly contains feature elements and handler.
- Medium: Plausible URL-path or component-name match with supporting evidence.
- Low: Text-search-only or heuristic match with limited corroboration.
Graceful Degradation
- No source code found: skip code correlation and return the prerequisite message.
- Feature cannot be mapped: add entry to
unmapped_featureswith reason and attempted methods. - Framework not detected: set to
unknownand use generic discovery. - LSP unavailable: skip LSP strategy and proceed with path/text/component search.
Safety and Scope Limits
- Do not modify application source code.
- Do not run the application.
- Do not trace full architecture.
- Keep call-chain analysis shallow (1-2 levels maximum).
Output
Save results to .claude/artifacts/code-map-{timestamp}/ and follow references/output-format.md.
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.

