agentleFS
mqmalagrismqmalagris/agent-skills/skills/code-craft/SKILL.md

code-craft

Skill0 starsChanged 6 days agoMITView on GitHub

Language- and framework-specific code best practices and idioms — complementary to compass (stack-agnostic architecture coach). Two modes: reader (rule + reason + example for a topic) and reviewer (apply rules to user code, flag violations with fixes). Ships rules for TypeScript, Rust, CSS/SASS, Tailwind, Dart, Go, Python and frameworks React, Next.js, RN+Expo, Hono, Cloudflare Workers, Astro, Svelte, Drizzle, Supabase, AWS Lambda+SAM, Terraform, Flutter. Use when the user asks for language-specific best practices ("TS best practices", "is this idiomatic Rust", "/code-craft ts"), wants a code review focused on language idioms (not architecture — see compass), or asks how to do X the right way in a specific language/framework.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    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. Distinctive:

    If the user asks for a language not yet supported, say so and offer to add a stub via the structure documented below.

    line 46
  2. Distinctive:

    If the list is long, group by severity:

    line 78
  3. Very specific:

    Create languages/<lang>.md or frameworks/<framework>.md.

    line 88
  4. Distinctive:

    Update the Supported table above.

    line 96

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

code-craft

Language- and framework-specific code best practices and idiom reference. Complements compass (stack-agnostic architecture / design coach) — code-craft is tactical and per-language.

Quick start

  1. Detect the language or framework from the user's request — explicit (ts, dart, flutter) or inferred from file extension / pasted code.
  2. Detect the mode:
    • reader — user asks "what is the best practice for X" or "how should I do Y in Z" → return matching rules from the language file (rule + reason + example).
    • reviewer — user pastes code or asks "review this" → load the relevant language file, scan for violations, report location → rule → fix.
  3. Load only the relevant file from languages/ (and a frameworks/ file if applicable). When the code touches a store (database, SQLite file, KV), also load general/data-access.md: its rules apply in every stack.
  4. Match the topic the user asked about — do not dump the entire language file when the user asked one question.

Supported

Language / frameworkFileStatus
TypeScriptlanguages/ts.mdshipped
Rustlanguages/rust.mdshipped
CSS / SASSlanguages/css-sass.mdshipped
React (19)frameworks/react.mdshipped
Next.js (14 / 15)frameworks/nextjs.mdshipped
React Native + Expo (SDK 53/54+)frameworks/react-native-expo.mdshipped
Hono (4.x)frameworks/hono.mdshipped
Cloudflare Workersframeworks/cloudflare-workers.mdshipped
Astro (4 / 5 / 6)frameworks/astro.mdshipped
Svelte 5frameworks/svelte.mdshipped
Drizzle ORMframeworks/drizzle.mdshipped
Tailwind CSS (v4)languages/tailwind.mdshipped
Supabaseframeworks/supabase.mdshipped
AWS Lambda + SAMframeworks/aws-lambda-sam.mdshipped
Terraform / OpenTofuframeworks/terraform.mdshipped
Dart 3languages/dart.mdshipped
Flutter (3.27+)frameworks/flutter.mdshipped
Go (1.21+)languages/go.mdshipped
Python (3.12+)languages/python.mdshipped
Data access (any stack)general/data-access.mdshipped
Angular, Vue 2, Ionic, Express, Strapi, LoopBack, BigCommerce, Mivaframeworks/*.mdlegacy / on demand

If the user asks for a language not yet supported, say so and offer to add a stub via the structure documented below.

When to defer to compass

Defer to compass if the user asks about:

  • Architecture / system design
  • SOLID, GoF patterns, MVC, microservices
  • Refactoring strategy across modules
  • TDD / CI/CD / DevOps
  • Stack selection or technology trade-offs
  • Security model, threat surface, perf budget

code-craft is for inside-the-file decisions. compass is for across-file / across-system decisions. When a user request straddles both, route the language-idiom parts here and the architecture parts to compass.

Reader-mode output format

For a single-rule ask:

Rule. Reason. Wrong vs. right example (3–6 lines).

For a topic ask (e.g. "TS error handling"), return the 3–6 most relevant rules in the same compact format, ordered by importance. Cite the source when there is genuine community debate (enums, barrel files, etc.).

Reviewer-mode output format

Flat numbered list, one violation per line:

1. <file>:<line> — <rule short name> — <one-sentence fix>
2. ...

If the list is long, group by severity:

  • must-fix — correctness or safety bugs
  • should-fix — idiom or maintainability
  • nice-to-have — style only

Close with a one-sentence summary. Do not re-print the user's code.

Adding a new language or framework file

  1. Create languages/<lang>.md or frameworks/<framework>.md.
  2. Group rules under buckets that fit the language — typical: tactical (day-to-day), idioms (ecosystem patterns), anti-patterns (smells).
  3. Each rule:
    • Short name (1–6 words)
    • One-sentence rule
    • One-line reason
    • ≤ 6-line wrong + right example
    • Source citation if there is debate
  4. Update the Supported table above.
  5. Aim for 30–60 rules per language file. Quality over quantity.

Confirmation discipline

  • Reader mode: no confirmation needed; just answer.
  • Reviewer mode: confirm scope before scanning ("idioms only, or include anti-patterns?"). Default to both. Security and performance reviews belong in compass — route there if asked.

When to skip code-craft

  • One-line tweaks (rename, fix typo, add import).
  • Throwaway scripts / spikes.
  • Generated code (migrations, codegen output, build artifacts).
  • Language not in the Supported table — say so, don't fabricate rules from training data.
  • User asks about architecture, security, or perf — route to compass instead.

Pipeline placement

grill-me → to-prd → compass → blueprint → code (+ code-craft) → compass (review)

code-craft sits during the code phase, applied tactically per-file as code lands. Use cases:

  • Drafting — when writing new code in a supported stack, apply rules silently to the just-written diff and self-correct before showing it.
  • PR review — alongside compass's reviewer workflow, run code-craft on the diff for stack-specific idiom violations.

code-craft does NOT replace compass's reviewer workflow. They run side-by-side at PR time: compass for cross-file architecture, code-craft for inside-file idioms.

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.