By hashiiiii
Enforce consistent git conventions (branch names, commits, PRs, issues) and generate OSS-style image assets, with locale-aware templates and pre-commit hooks.
Use when naming a git branch or writing a commit message.
Use when creating image assets for a project — logo marks, app or extension icons, favicons, promo tiles, or repository header images, especially flat geometric ones in the modern OSS style (dark background, single accent color).
Use when creating or editing GitHub issues. Structures issue bodies with Background, Problem, Scope, Design, Acceptance criteria, and Notes.
Use when setting or changing rules-for-ai locale preferences. Writes the user-level LOCALE.md.
Use when creating or editing a GitHub pull request. Follow the repository PR template when one exists; otherwise use the default Summary / Motivation / Changes / Testing structure.
Executes bash commands
Hook triggers when Bash tool is used
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Portable rules and skills for AI coding agents.
Write your rules once and carry them across Claude Code and Cursor as an installable, updatable plugin — no more copy-pasting the same instructions into every machine and repository. Language preferences for issues, pull requests, comments, logs, and test logs are resolved per user and overridden per project. Use it as is, or fork it and swap in your own rules.
rules-for-ai.sh installs, updates, and uninstalls everything. Choose a platform — claude or cursor — and a scope.
| Scope | Meaning |
|---|---|
| user | Every project on this machine |
| project | One repo, shared with your team via git |
| local | One repo, just you, nothing committed |
flowchart LR
Q{Who shares this?}
Q -->|Only me| L[local]
Q -->|My team| P[project]
Q -->|All my projects| U[user]
curl -fsSL https://raw.githubusercontent.com/hashiiiii/rules-for-ai/main/rules-for-ai.sh | sh -s -- <install|uninstall> <claude|cursor> <user|project|local> [path/to/repo]
# e.g. curl -fsSL https://raw.githubusercontent.com/hashiiiii/rules-for-ai/main/rules-for-ai.sh | sh -s -- install claude user
./rules-for-ai.sh <install|uninstall> <claude|cursor> <user|project|local> [path/to/repo]
# e.g. ./rules-for-ai.sh install cursor project path/to/repo
path/to/repo applies to project and local only and defaults to the current directory. Re-running install updates in place. Uninstall removes exactly what install created.
What each platform puts where, and how locale reaches the model, is in Platform details.
Language preferences live in one user-level file: ~/.config/rules-for-ai/LOCALE.md. You can ask the agent to set your locale and the hashiiiii-locale skill (it ships with every install) writes the file with all five keys (POSIX-style tags such as ja_JP or en_US):
| Key | Artifact |
|---|---|
issues | Issues |
pull-requests | Pull requests |
comments | Code comments |
logs | Log messages |
test-logs | Test log messages |
Tell it one tag for everything (ja_JP) or one per artifact (issues=ja_JP pull-requests=ja_JP comments=ja_JP logs=en_US test-logs=en_US). The skill only ever writes the user-level file — never a file inside a project.
Two layers decide the effective language:
CLAUDE.md / AGENTS.md language policy always wins when present.~/.config/rules-for-ai/LOCALE.md (respect $XDG_CONFIG_HOME when set) — the file the skill maintainsen_US default for all keysOne shared resolver implements this chain on both platforms and at every scope; only the location of the bundled default differs per install layout. A session hook injects the resolved keys into context. There is no project-level LOCALE.md. A file at the project root is ignored. Put project-specific language policy in that project's CLAUDE.md / AGENTS.md instead.
Re-run the same install command (or the curl one-liner). Claude Code can also run /plugin marketplace update hashiiiii.
Fork, edit AGENTS.md and skills/, then install from your fork instead of hashiiiii/rules-for-ai.
Skills use the hashiiiii- prefix. Rename to your own and find every reference:
grep -rl 'hashiiiii-' .
Also set REPO in rules-for-ai.sh and repository in .claude-plugin/plugin.json.
Releases are cut from the Actions tab — no local tagging.
main selected, and enter the version as X.Y.Z (no v prefix).version in both plugin manifests, commits chore: release vX.Y.Z, tags it, and creates the GitHub release with generated notes.The release commit is authored by a GitHub App, so a one-time setup is required: install the App on this repo, add its APP_CLIENT_ID / APP_PRIVATE_KEY secrets, and add the App to the main ruleset's bypass actors so it can push the commit past the pull-request requirement.
npx claudepluginhub hashiiiii/rules-for-ai --plugin rules-for-aiGit and release: /commit, /checkout, /pr, /issue with conventional commits and PR generation
LLM-powered guardrails for Claude Code. Turn every AI mistake into a rule AI can't repeat.
Intelligent sync of Claude instructions with enforcement hooks for security and consistency
Generate better AI code with task-aware policies for Claude Code.
CLI tool that standardizes AI-generated projects with templates, rules enforcement, and automation to maintain consistency across codebases.
Create custom behavioral rules through markdown configuration files - prevent unwanted behaviors with pattern matching