agentleFS
moberghrmoberghr/mtk-agent-toolkit/.claude/skills/context-engineering/SKILL.md

context-engineering

Skill9 starsChanged 29 days agoMITView on GitHub

Use when starting a session, switching between planning/implementation/review phases, entering unfamiliar code, or when output drifts from project norms.

131 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use using-agent-skills, idea-refine 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.
  • LLl0k0laDSkill

    using-agent-skills

    Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.

    Also in 36 projects that use this

  • LLl0k0laDSkill

    idea-refine

    Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.

    Also in 44 projects that use this

  • HK-hubSkill

    deprecation-and-migration

    Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.

    Also in 40 projects that use this

  • MrCipherSmithSkill

    constraint-driven-development

    Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.

    Also in 14 projects that use this

  • HK-hubSkill

    source-driven-development

    Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters.

    Also in 44 projects that use this

  • +6 more from LLl0k0laD
  • +1 more from HK-hub

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 117 edited versions we read keep these.

  • 1

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

    If nothing resolves, infer with bash scripts/setup-detect.sh --json (read-only) and load the matching stack skill.

    line 42
  2. Distinctive:

    Read the file to be changed and 2-3 neighbours that set the local pattern.

    line 57

“Common” is measured: kept by at least 6 in 10 of the 117 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.

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

Context Engineering

Active Stack

echo "--- Tech Stack ---"
_rts="${CLAUDE_PLUGIN_ROOT}/scripts/resolve-tech-stack.sh"; [ -f "$_rts" ] || _rts="scripts/resolve-tech-stack.sh"
if [ -f "$_rts" ]; then bash "$_rts" --explain "$PWD" 2>&1; echo; else cat .claude/tech-stack 2>/dev/null || echo "(not set)"; fi
if [ -f .claude/tech-stack-pm ]; then echo "--- Package Manager ---"; cat .claude/tech-stack-pm; fi

Overview

Load the minimum context the current phase needs, from the right stack, and refresh it when the scope changes. The constitution (AGENTS.md / CLAUDE.md) is already loaded by the harness; do not re-read it.

When To Use

  • Phase 0 of fix, batch-fix, and implement, and at every later phase boundary
  • Entering an unfamiliar area, or when new files enter scope

Workflow

  1. Resolve the stack for the files in scope. bash scripts/resolve-tech-stack.sh <path> is polyglot-aware (subproject .claude/tech-stack → root .claude/tech-stack.map glob → root file). Pass a representative target path, not $PWD, when the change sits in a subtree; add --check <paths> to warn when the resolved stack disagrees with the files. Then read .claude/skills/tech-stack-{stack}/SKILL.md for build/test commands and reference paths. If nothing resolves, infer with bash scripts/setup-detect.sh --json (read-only) and load the matching stack skill; if that is empty too, say the stack is unconfigured (suggest /mtk-setup) and continue in degraded mode.
  2. Load references for the current phase only. Spec: domain-finance.md (finance and security supplement, only when scope touches auth/financial/infra) and the stack's testing supplement. Implementation: the stack's ## Reference Files entries for the touched layers. Review: pre-commit-review-list.md if present. Read by section where one section is enough.
  3. applyTo matching. Reference entries in .claude/manifest.json may declare an applyTo glob array. Test each file in scope (the spec's change_manifest, else git diff --name-only HEAD) against the globs with case/fnmatch semantics; load the references that match at least one file and skip the rest. References without applyTo load on demand per phase. Re-run the match when new files enter scope.
  4. Native paths: rules. .claude/rules/*.md carry paths: frontmatter and Claude Code loads a rule only when a matching file is read or edited. Do not read every rule up front; when the task needs a rule whose paths did not match (a security pass, a release), read that one file.
  5. Read the file to be changed and 2-3 neighbours that set the local pattern.
  6. Independent reads go out in one message, not sequentially.

Bound tool output before pruning instructions: instructions are prompt-cached, tool output is re-billed every turn. Model tiers per phase live in .claude/references/model-routing.md.

Verification

  • Stack resolved for the files in scope (not just the repo root)
  • References loaded for the current phase only; applyTo matched against real touched files
  • Local pattern files read before editing or reviewing

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.