system-layer-extraction

system-layer-extraction is a skill for Claude Code from FarzamMohammadi/the-engineer. It costs 140 tokens per session (1,874 once invoked), scanned A, original, MIT.

A thorough process for mapping every system in a software codebase and documenting how those systems connect. It traces files and imports to show boundaries, dependencies, state, lifecycles, and which parts could be isolated.

In plain words
What is it for?
Use it to document a project's architecture, map system boundaries, investigate dependencies, plan separation of components, and create an interactive system map.
Why use it?
It makes hidden structure and tightly connected areas easier to see before a refactor. This supports safer changes, faster onboarding, and clearer architectural decisions.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

Good fit Use it to document a project's architecture, map system boundaries, investigate dependencies, plan separation of components, and create an interactive system map.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/farzammohammadi/the-engineer/system-layer-extraction
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add FarzamMohammadi/the-engineer --skill system-layer-extraction
Clone the repo
git clone --depth 1 https://github.com/FarzamMohammadi/the-engineer

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for system-layer-extraction

README.md
[![agentmods](https://agentmods.dev/badge/skills/farzammohammadi/the-engineer/system-layer-extraction/github.svg)](https://agentmods.dev/skills/farzammohammadi/the-engineer/system-layer-extraction)
Your own site
<a href="https://agentmods.dev/skills/farzammohammadi/the-engineer/system-layer-extraction"><img src="https://agentmods.dev/badge/skills/farzammohammadi/the-engineer/system-layer-extraction/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for system-layer-extraction

Your own site · 80×15
<a href="https://agentmods.dev/skills/farzammohammadi/the-engineer/system-layer-extraction"><img src="https://agentmods.dev/badge/skills/farzammohammadi/the-engineer/system-layer-extraction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,874 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00140 $0.01874
Opus 5 $0.00070 $0.00937
Sonnet 5 $0.00028 $0.00375
Haiku 4.5 $0.00014 $0.00187

Measured 9d ago against content hash ff685488910d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

system-layer-extraction scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/system-layer-extraction/SKILL.md · 181 lines

How it starts

The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.

System Layer Extraction

Investigate an entire codebase file-by-file to extract every system, map their boundaries, dependencies, state, lifecycle, and isolation potential. Produce a comprehensive layered architecture document and interactive visualization.

This is slow, thorough work. The value comes from reading actual source code — not READMEs, not architecture docs, not summaries. Every file gets read. Every import gets traced. The output is a document that makes the invisible structure visible.


Why This Matters

Codebases accumulate structure over time that nobody fully sees. Systems intertwine. Dependencies form that aren't in any diagram. State gets shared in ways the original authors didn't intend. This skill makes all of that explicit — so you can refactor with confidence, onboard new contributors faster, and identify where isolation is strong vs where it's fragile.


The Process

Step 1: Set Up

Create a working branch so the output files don't pollute the main branch:

git checkout -b system-layer-extraction

Step 2: Map the Territory

Before reading any code, get the full picture of what exists:

# All non-test source files, sorted
find src -name "*.ts" ! -name "*.test.ts" ! -name "*.spec.ts" | sort

# All source directories
find src -type d | sort

# Line counts per directory (rough sizing)
find src -name "*.ts" ! -name "*.test.ts" | xargs wc -l | sort -n

This gives you the raw material: how many files, how they're organized, where the mass is.

Step 3: Group Files Into Investigation Areas

Divide all source files into 5-8 logical groups based on directory structure and apparent concern. Each group becomes one subagent's assignment. Typical groupings:

  • Entry points + CLI + Bootstrap — how the system starts, wires, and presents to users
  • Communication infrastructure — event bus, observer/logging, streaming
  • Core domain services — task engine, safety, authorization, memory, workspace
  • Intelligence/orchestration — the brain, phase pipeline, prompts, LLM interaction
  • Plugin ecosystem — adapters, registry, hooks, concrete plugin implementations
  • Data layer — database, config, schemas, migrations
  • UI/Dashboard — if present, the monitoring/visualization layer
  • Cross-cutting — utilities, shared types, interfaces

Read the full file on GitHub · 181 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 181 lines · 140 tokens per session scan A ff685488910d

Subscribe to this mod's changes

system-layer-extraction is a skill published in the GitHub repository FarzamMohammadi/the-engineer (12 stars, last pushed 1mo ago), licensed MIT. It adds 140 tokens to every session and 1,874 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

doubt-driven-review

In-flight adversarial check on a non-trivial decision BEFORE it stands — distinct from post-hoc review of a finished diff. Use on "stress-test this decision", "are we sure about this", "verify before commit", "poke holes in this", when working in unfamiliar code, or before an irreversible step (migration, prod deploy…

BlackBeltTechnology/pi-agent-dashboard · 90 tokens

release-cut

Cut a new pi-agent-dashboard release: promote ## [Unreleased] in CHANGELOG.md, bump every workspace package.json per SemVer, commit, tag v , and push — triggering the Release workflow that publishes every non-private workspace, builds the Electron artifacts, and creates a GitHub Release. Use on "cut a release"…

BlackBeltTechnology/pi-agent-dashboard · 93 tokens

spec-coherence-check

Sweep all active OpenSpec proposals for staleness, conflicts, and obsolescence against the current codebase and archived changes. Use when proposals may be outdated, when checking cross-proposal conflicts, or before starting a batch of implementations. Produces a gap-analysis report, updates a priority queue file, and…

BlackBeltTechnology/pi-agent-dashboard · 80 tokens

ship-it

Worktree-side implementation orchestrator for an OpenSpec change. Idempotent: gates automated scenarios on filesystem reality, owns the red-test fix loop, runs the docker harness with always-teardown, then drives ship-change inline. Escape hatch writes SHIPITBLOCKED.md. Runnable headless. Triggers: "ship it", "build…

BlackBeltTechnology/pi-agent-dashboard · 92 tokens

faq-mine

Mine docs/faq.md from README.md, docs/.md, and the pi-hermes memory stores. Dispatches @fast subagents per source, dedupes against the existing FAQ, and merges entries in caveman style. Use when asked to "build / regenerate / extend the FAQ", "mine docs into FAQ", "mine hermes memory into FAQ", "surface runtime…

BlackBeltTechnology/pi-agent-dashboard · 94 tokens

session-to-guideline

Turn a pi session into a Markdown "how-we-did-it" collaboration guideline: reads the session's JSONL transcript and synthesizes a reusable playbook of which prompts worked, what had to be steered, and how to reproduce the result faster. Use when: "document this session", "write up how we did X with the AI", "make a…

BlackBeltTechnology/pi-agent-dashboard · 93 tokens