Agent skill
localize-rules
ルールをプロジェクトに最適化。郷に入っては郷に従え精神。Use when user mentions localizing rules, adapting rules to project, or customizing templates. Do NOT load for: app i18n/localization features, business rule implementation.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/localize-rules
SKILL.md
Localize Rules Skill
Analyzes project structure and optimizes .claude/rules/ rule files for the project.
Quick Reference
- "Adapt rules to this project" → this skill
- "Match rules to repo structure" → auto-detects directories/language/test config
- "I don't know what to decide" → "detect→propose" first, confirm only needed items
Deliverables
- Updates
.claude/rules/to match actual project structure - Prevents drift in "allowed locations/tests/conventions" for future work
Purpose
Customize generic rule templates to match actual project structure:
- paths: adapted to actual source directories (
src/,app/,lib/, etc.) - Add language-specific rules (TypeScript, Python, React, etc.)
- Auto-detect test directories
Execution
Run the localization script:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/localize-rules.sh"
Or dry-run to preview:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/localize-rules.sh" --dry-run
Note: If
CLAUDE_PLUGIN_ROOTis unavailable, run from plugin repo root:bash ./scripts/localize-rules.sh
Detection Targets
| Item | Detection Method | Example |
|---|---|---|
| Source directories | src/, app/, lib/ existence |
paths: ["src/**/*"] |
| Language | package.json, requirements.txt, Cargo.toml | TypeScript, Python, Rust |
| Test framework | jest.config, vitest.config, pytest.ini | Jest, Vitest, pytest |
| Component library | package.json dependencies | React, Vue, Svelte |
Updated Rules
| Rule File | Updates |
|---|---|
workflow.md |
Source paths, test commands |
testing.md |
Test framework config |
code-style.md |
Language conventions |
Related Skills
setup- Initial project setupharness-init- Harness initialization
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?