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.

Stars 163
Forks 31

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
bash "${CLAUDE_PLUGIN_ROOT}/scripts/localize-rules.sh"

Or dry-run to preview:

bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/localize-rules.sh" --dry-run

Note: If CLAUDE_PLUGIN_ROOT is 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 setup
  • harness-init - Harness initialization

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results