agentleFS
477174477174/interface-mcp-agent-creator/.claude/skills/code-correlator/SKILL.md

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.

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
  1. Very specific:

    Check whether local application source code is present by looking for common roots such as src/, app/, pages/, or components/.

    line 12
  2. Distinctive:

    If no source code is found, do not fail.

    line 13
  3. Very specific:

    If source code is found, detect framework signals from project files such as package.json, tsconfig.json, vite.config.*, next.config.*, …

    line 17
  4. Very specific:

    If framework detection is unclear, set framework to unknown and continue with generic strategies.

    line 18
  5. Very specific:

    Read references/framework-hints.md for framework detection and file/layout patterns.

    line 21
  6. Very specific:

    Read references/component-discovery.md for ordered correlation strategies.

    line 22
  7. Very specific:

    Read references/test-patterns.md for optional behavior verification.

    line 23
  8. Very specific:

    Read references/output-format.md for output schema and required fields.

    line 24
  9. Very specific:

    Use references/framework-hints.md to classify project as one of: react, vue, angular, svelte, vanilla, or unknown.

    line 34
  10. Distinctive:

    Prefer explicit config and dependencies over heuristic extension-only detection.

    line 35
  11. Distinctive:

    Do not assume any tool provider naming or hardcoded prefixes.

    line 45
  12. Very specific:

    Follow the exact structure defined in references/output-format.md.

    line 59
  13. Distinctive:

    If confidence remains unclear, keep mapping but set conservative confidence and notes.

    line 64
  14. Very specific:

    Write artifacts to .claude/artifacts/code-map-{timestamp}/.

    line 67
  15. Very specific:

    Ensure schema compatibility with references/output-format.md.

    line 68
  16. Distinctive:

    Search for UI element labels/headings from feature metadata.

    line 78
  17. Distinctive:

    Use text matches to find candidate files, then filter by framework-relevant file types.

    line 79
  18. Distinctive:

    When language server support exists, resolve symbol definitions and references to improve precision.

    line 86
  19. Distinctive:

    If unavailable, skip cleanly and continue with non-LSP methods.

    line 87
  20. Distinctive:

    No source code found: skip code correlation and return the prerequisite message.

    line 95
  21. Distinctive:

    Do not modify application source code.

    line 101
  22. Distinctive:

    Do not run the application.

    line 102
  23. Distinctive:

    Do not trace full architecture.

    line 103
  24. Distinctive:

    Keep call-chain analysis shallow (1-2 levels maximum).

    line 104

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Check whether local application source code is present by looking for common roots such as src/, app/, pages/, or components/.
  2. 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."

  1. 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, and svelte.config.*.
  2. If framework detection is unclear, set framework to unknown and continue with generic strategies.

Reference Loading

  • Read references/framework-hints.md for framework detection and file/layout patterns.
  • Read references/component-discovery.md for ordered correlation strategies.
  • Read references/test-patterns.md for optional behavior verification.
  • Read references/output-format.md for 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_id values exactly as provided; downstream consumers rely on exact ID stability.

Step 2: Detect Framework

  • Use references/framework-hints.md to classify project as one of: react, vue, angular, svelte, vanilla, or unknown.
  • 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:

  1. URL path match
  2. Text search
  3. Component search
  4. 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_id
  • component_file
  • handler_function
  • line_range
  • framework_detected
  • discovery_method
  • confidence
  • related_files
  • test_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 -> likely pages/admin/users.* or app/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_features with reason and attempted methods.
  • Framework not detected: set to unknown and 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.