Let’s Get Certified
Module 07 / 12 · Claude Code configuration and workflows

Project instructions, rules, and skills

Set up shared conventions, file-specific rules, and reusable commands.

Work from a fresh team checkout

A new contributor follows the team’s coding workflow but produces fixtures in a different format. An established contributor gets the expected format on the same revision. Compare the instructions each session actually loaded.

3.1 · Put conventions at the scope that owns them

Put shared defaults in a committed root CLAUDE.md or .claude/CLAUDE.md. Personal preferences belong in ~/.claude/CLAUDE.md. A nested directory can carry conventions specific to that subtree. Put a shared fixture contract in version control and import it where needed with @docs/fixtures.md. Split lengthy instructions into focused files under .claude/rules/. Inspect the active inputs with /memory and reproduce the problem from the contributor’s directory.

Explain why a fresh checkout uses the wrong fixture

Two engineers run the same task against the same commit. One produces timestamps with offsets, the other produces local times. The only copy of the expected fixture convention is in the first engineer’s home directory. The monorepo also has a special legacy package with its own format. Lay out the instructions and choose a verification step.

Compare the loaded instructions

Put the common fixture convention under version control. A root project instruction can point to the canonical document with an import. Use a nested instruction for the exception owned by the legacy package. Split unrelated topics into focused rule files so future readers can locate the owner of a convention. Leave individual writing preferences in user scope.

Open a clean session from the relevant working directory, inspect the active memory with /memory, and exercise one ordinary fixture and one legacy fixture. Have a teammate reproduce the result without the original user file. A correctly formatted answer on the first engineer’s machine alone cannot identify which instruction produced it.

Official reference · Claude Code instructions and rules

3.2 · Package a repeatable workflow

Use a skill for a procedure invoked when needed. Store a shared skill at .claude/skills/check-fixture/SKILL.md. Project slash commands can also live in .claude/commands/. Use a distinct name under the corresponding personal directory for an individual variant. A convention required in every change belongs in project instructions so it is available even when nobody invokes the skill.

---
name: check-fixture
description: Inspect a fixture against the repository contract.
argument-hint: "[fixture path]"
context: fork
allowed-tools: Read, Glob, Grep
---
Read the named fixture. Return the failing field and expected format.

A fork keeps verbose exploration out of the parent conversation. The argument hint tells the caller what to supply. Limit pre-approved tools to the operations the procedure needs and enforce hard restrictions through permissions. A hint does not validate a path or establish permission to write.

Package a diagnostic that has a noisy intermediate trace

A team wants /fixture-audit orders to read fixtures and return only failures. One engineer wants a verbose personal variant. A missing package argument should be discoverable at invocation. Where do the procedure, hint, and two variants belong?

Design the shared invocation

Commit the shared procedure under .claude/skills/fixture-audit/SKILL.md. Its argument hint can show the expected package, and the instructions should validate the supplied value or request it. Use a forked context for verbose discovery and return a compact failure record with path, field and observed value. Pre-approve only the reads required by the procedure and enforce hard denials separately in the host.

Use a distinct name under personal skills for the verbose variant. An established project slash command can also live under the project commands directory. Test from a fresh clone, including the missing-argument path. Keep universal fixture requirements in project instructions so they also apply when the diagnostic is never invoked.

Official reference · Claude Code skills

3.3 · Load a rule where its files live

For tests distributed across several packages, put a rule in .claude/rules/tests.md with the frontmatter below. A directory-specific memory file suits a single subtree. A path pattern reaches matching files in multiple subtrees while keeping unrelated work free of the rule.

---
paths:
  - "**/*.spec.ts"
---
Use the repository clock fixture for time-sensitive assertions.

Try it on a matching test and a neighboring implementation file. If both pick up the convention, check for an unconditional copy in root memory and confirm the glob and filename.

Predict which files activate a rule

A team stores clock-sensitive tests at packages/ui/clock.test.tsx and apps/demo/clock.test.tsx. A production component is packages/ui/clock.tsx. The rule currently lives in the UI package’s nested instructions. Predict the desired behavior for all three paths and specify a change.

Evaluate the path matrix

The first two paths should receive the fake-clock convention. The production file should retain the ordinary component conventions. Put a scoped rule under .claude/rules/ whose YAML paths contains **/*.test.tsx. A new matching test in another package then gets the same guidance without copying the rule.

Test once per path in a clean context. If the neighboring production file still receives the clock instruction, look for a duplicate unconditional copy in project memory. If the demo test misses it, inspect both the glob and the file extension. Rule activation follows the matching path, while the test runner’s naming configuration is a separate concern.

Official reference · Claude Code instructions and rules

Further reading · Claude Code instructions and rules · Claude Code skills

Knowledge check

Project instructions, rules, and skills quiz

Answer 9 questions. Check each answer for an explanation.