agentleFS
dmzoneilldmzoneill/skills/learn-architecture/SKILL.md

learn-architecture

Skill2 starsChanged 19 days agoApache-2.0View on GitHub

Deep scan of project structure to update architecture knowledge. Uses semantic code search for API, model, error, and test patterns. Use to bootstrap or refresh project knowledge.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read pyproject.toml, requirements.txt, package.json

    line 32
  2. Very specific:

    If focus: code_search("{focus} implementation pattern", project, limit=10) → focus_patterns

    line 40
  3. Very specific:

    If "index not found": learn_tool_fix("code_search", "index not found", "Vector index not created", "Run skill_run('bootstrap_knowledge')")

    line 54

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

Learn Architecture

Scans directory structure, dependencies, and semantic patterns to update project knowledge.

Inputs

InputTypeDefaultPurpose
projectstringautoProject from config (auto from cwd)
personastringcurrentPersona to update
focusstring-Area to focus (e.g., "api", "tests", "models")
use_vector_searchbooltrueUse semantic search for pattern discovery

Workflow

1. Check Known Issues

  • check_known_issues(tool_name="code_search", error_text="")

2. Detect Project & Persona

  • Infer project from cwd via config; default persona "developer"

3. Scan Directory Structure

  • Walk project path (max 3 levels), skip node_modules, pycache, venv
  • Build tree of key dirs: src, lib, app, api, core, services, models, tests, etc.

4. Analyze Dependencies

  • Read pyproject.toml, requirements.txt, package.json
  • Extract top dependencies

5. Semantic Code Search (if use_vector_search)

  • code_search("API endpoint route handler request response", project, limit=10) → api_patterns
  • code_search("class model schema database table field", project, limit=10) → model_patterns
  • code_search("exception error handling try except raise", project, limit=10) → error_patterns
  • code_search("test fixture mock assert pytest unittest", project, limit=10) → test_patterns
  • If focus: code_search("{focus} implementation pattern", project, limit=10) → focus_patterns

6. Update Knowledge

  • knowledge_update(project, persona, section="architecture.key_modules", content=modules_list)
  • knowledge_update(project, persona, section="architecture.dependencies", content=dependencies)

7. Build Result

Output markdown with:

  • Key modules found
  • Dependencies list
  • Patterns discovered (API, models, errors, tests)
  • Focus area results if specified

8. Error Handling

  • If "index not found": learn_tool_fix("code_search", "index not found", "Vector index not created", "Run skill_run('bootstrap_knowledge')")

9. Log

  • memory_session_log("Learned architecture for {project}", "Persona: {persona}")

Key MCP Tools

  • code_search — semantic pattern discovery
  • knowledge_update — write architecture to knowledge
  • check_known_issues, learn_tool_fix — error handling
  • memory_session_log — session logging

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.