From ac
Create path-scoped .claude/rules/ for Claude Code projects. Use when adding coding conventions, framework patterns, or domain-specific rules that auto-inject when matching files are touched.
npx claudepluginhub anilcancakir/claude-code-plugin --plugin acThis skill uses the workspace's default tool permissions.
Create path-scoped rules that auto-inject when Claude Code reads, writes, or edits matching files. Rules hold "how to code HERE" — CLAUDE.md holds "what this project IS".
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Create path-scoped rules that auto-inject when Claude Code reads, writes, or edits matching files. Rules hold "how to code HERE" — CLAUDE.md holds "what this project IS".
~/.claude/CLAUDE.md ← always (global)
./CLAUDE.md ← always (project)
.claude/rules/<name>.md ← ON-DEMAND when matching file touched
CLAUDE.md and rules are visible simultaneously. Any overlap = wasted tokens. Rules are ADDITIVE — never duplicating CLAUDE.md, never re-stating what my-coding already covers.
| Tier | Scope | Lines | Example |
|---|---|---|---|
| Stack | All files of a language | 10-20 | flutter.md → lib/**/*.dart |
| Domain | Specific module | 15-40 | database.md → lib/src/database/**/*.dart |
Stack and domain globs can overlap — both inject when a domain file is touched. This is intentional: stack provides general conventions, domain adds deep API knowledge.
1. Identify Scope
Determine which files need this rule. Define the narrowest glob that covers the affected area:
lib/**/*.dart, src/**/*.tssrc/api/**/*.ts, app/Http/Controllers/**/*.phptest/**/*_test.dart, tests/**/*.test.tsAvoid **/* — too broad. Rules must add value only when the matched files are being touched.
2. Classify Tier
3. Dedup Check
Read these sources before writing any rule content:
./CLAUDE.md — project-wide conventions already stated~/.claude/CLAUDE.md — global workflow rules~/.claude/skills/my-coding/SKILL.md — general coding standardsApply this algorithm to each proposed convention:
Also verify no proposed convention duplicates another rule in .claude/rules/ if rules already exist.
4. Draft Rule
Flat bullet list, imperative mood. Optional H1 heading for domain rules (not for stack rules).
Include:
Exclude:
5. Verify
.claude/rules/ files---
path: "<glob>"
description: "<informational only — not used for triggering>"
---
path is the only meaningful field — it controls when the rule injects. description is informational only.
Rules do NOT support: model, tools, user-invocable, context, or any other skill/agent frontmatter fields. The rule system is intentionally minimal.
~/.claude/CLAUDE.md or ./CLAUDE.md~/.claude/skills/my-coding/SKILL.mdRules = project-specific, path-specific, verifiable conventions only.
---
path: "lib/**/*.dart"
description: "Flutter/Dart conventions for all app source files"
---
- Use `freezed` for data classes — never write `copyWith` or `==` manually
- Import with relative paths within `lib/`, package paths for external deps
- Prefer `AsyncValue` from Riverpod over raw `Future` in UI state
- Name providers `<feature>Provider` — never suffix with `Notifier` unless it IS a notifier
- `context.mounted` check required after every `await` that uses `context`
- Use `ref.invalidate()` to force refresh, not `ref.refresh()` (deprecated)
- `AppException` for domain errors, `Failure` sealed class for result types
---
path: "src/api/**/*.ts"
description: "API route handlers and middleware conventions"
---
# API Layer
- Export route handlers as named functions — never default exports
- Validate all request bodies with Zod schemas before business logic
- Return `ApiResponse<T>` wrapper — never raw objects from handlers
- Use `withAuth(handler)` middleware HOC for authenticated routes
- Error handling: `throw new ApiError(code, message)` — caught by global error middleware
- Route files name pattern: `<resource>.routes.ts`, handler files: `<resource>.handlers.ts`
- `req.user` is typed as `AuthenticatedUser` after `withAuth` — no null checks needed inside
- Never call service layer from middleware — middleware is cross-cutting only
- Pagination: `PaginatedQuery` schema from `@/schemas/common` — don't redefine per-route