# Manage patterns and rules

> Manage patterns and rules is an open-source agent skill for developer tools. Guides the agent through authoring project design patterns and coding rules. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/AgiFlow/aicode-toolkit/tree/main/plugins/aicode-admin/skills/manage-patterns-and-rules
- **Repository:** https://github.com/agiflow/aicode-toolkit
- **GitHub stars:** 162
- **License:** AGPL-3.0
- **Skill name:** manage-patterns-and-rules
- **Collection:** https://github.com/AgiFlow/aicode-toolkit
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill walks an agent through changing the design pattern and coding rule definitions that an architect-mcp setup uses to check a project. It starts by reading the project's architect.yaml, RULES.yaml, template mapping and existing rules, then looks up which patterns apply to a target file before any edit is made. Drafts of a rule or pattern, including its file selectors and examples, are meant to be approved by the user before config writes happen, with extra care for inherited or global changes.

The workflow relies on architect-mcp admin tools such as add-design-pattern, add_rule and validate-architect, and it explicitly warns against guessing argument keys. After edits, the agent re-queries patterns and runs a code change review on affected files, then tests the change against representative matching and non-matching paths. It finishes with an impact summary and rollback guidance. Where a review needs an agent backend, the skill asks for consent first.

Using it requires an architect-mcp server with the admin tools available in the project, plus access to the project's configuration files.

## When your agent uses it

> Author project design patterns and coding rules with architect-mcp admin tools. Trigger when the user asks to change pattern or rule definitions. Do not trigger for reviewing existing code against unchanged rules.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/AgiFlow/aicode-toolkit/tree/HEAD/plugins/aicode-admin/skills/manage-patterns-and-rules)
- [License: AGPL-3.0](https://github.com/AgiFlow/aicode-toolkit/tree/HEAD/plugins/aicode-admin/skills/manage-patterns-and-rules)

## Features

- **Pattern and rule authoring:** Drafts design patterns and coding rules with file selectors and examples before writing them.
- **Config inspection:** Reads architect.yaml, RULES.yaml, template mappings and existing rules before making changes.
- **Approval before writes:** Requests user approval for config changes, especially inherited or global ones.
- **Post-change review:** Re-queries patterns and runs a code change review on the edited files.
- **Fixture testing:** Checks changes against matching and non-matching example paths.
- **Rollback guidance:** Summarizes the impact of a change and explains how to revert it.

## Good for

- Add a new coding rule for file naming in a TypeScript project
- Update an existing design pattern's file selectors
- Create a rule that restricts imports between architecture layers
- Review the impact of a rule change before rolling it out
- Validate architect.yaml after editing project configuration

## Install

### Claude Code

This skill ships in the `aicode-admin` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add AgiFlow/aicode-toolkit
/plugin install aicode-admin@aicode-toolkit
```

Or copy only this skill to `~/.claude/skills/manage-patterns-and-rules`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/manage-patterns-and-rules &&
cp -R "$tmp/plugins/aicode-admin/skills/manage-patterns-and-rules" ~/.claude/skills/manage-patterns-and-rules &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/manage-patterns-and-rules` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/manage-patterns-and-rules` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/manage-patterns-and-rules &&
cp -R "$tmp/plugins/aicode-admin/skills/manage-patterns-and-rules" ~/.agents/skills/manage-patterns-and-rules &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/manage-patterns-and-rules` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/manage-patterns-and-rules` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/manage-patterns-and-rules &&
cp -R "$tmp/plugins/aicode-admin/skills/manage-patterns-and-rules" ~/.cursor/skills/manage-patterns-and-rules &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/manage-patterns-and-rules` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/AgiFlow/aicode-toolkit.git --path plugins/aicode-admin/skills/manage-patterns-and-rules
```

Or copy the folder to `~/.gemini/skills/manage-patterns-and-rules` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/manage-patterns-and-rules`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/manage-patterns-and-rules &&
cp -R "$tmp/plugins/aicode-admin/skills/manage-patterns-and-rules" ~/.copilot/skills/manage-patterns-and-rules &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/manage-patterns-and-rules` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/AgiFlow/aicode-toolkit.git
```

Then copy `aicode-toolkit/plugins/aicode-admin/skills/manage-patterns-and-rules` into your agent's skills folder as `manage-patterns-and-rules`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Manage patterns and rules trigger?

It triggers when the user asks to change pattern or rule definitions. It does not trigger for reviewing existing code against rules that stay unchanged.

### What tools does Manage patterns and rules need?

It uses architect-mcp admin tools, including get-file-design-pattern, add-design-pattern, add_rule, validate-architect and review-code-change.

### Does Manage patterns and rules change files without asking?

No. The workflow asks for approval before config writes, especially inherited or global changes, and asks for consent before invoking agent backends.

### How do I install Manage patterns and rules in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/manage-patterns-and-rules to use it in all your projects, or to .claude/skills/manage-patterns-and-rules in one project. Or install the aicode-admin plugin, which includes it: /plugin marketplace add AgiFlow/aicode-toolkit, then /plugin install aicode-admin@aicode-toolkit.

### Does Manage patterns and rules run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Manage patterns and rules?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Manage patterns and rules?

The closest alternatives to Manage patterns and rules are Architect, Develop feature, Patterns, Writing rules and Architecture reasoning.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Architect](https://ai-powered.com/skills/architect-michael-denyer): Architect is an open-source agent skill for developer tools.
- [Develop feature](https://ai-powered.com/skills/develop-feature): Develop feature is an open-source agent skill for developer tools.
- [Patterns](https://ai-powered.com/skills/patterns-xiaolai): Patterns is an open-source agent skill for developer tools.
- [Writing rules](https://ai-powered.com/skills/writing-rules-xiaolai): Writing rules is an open-source agent skill for developer tools.
- [Architecture reasoning](https://ai-powered.com/skills/architecture-reasoning): Architecture reasoning is an open-source agent skill for developer tools.
- [Agent architecture](https://ai-powered.com/skills/agent-architecture): Agent architecture is an open-source agent skill for developer tools.
- [Prd v06 architecture design](https://ai-powered.com/skills/prd-v06-architecture-design): Prd v06 architecture design is an open-source agent skill for design and media.
- [Figma create design system rules](https://ai-powered.com/skills/figma-create-design-system-rules): Figma create design system rules is a free agent skill for design and media.

---
Source: https://ai-powered.com/skills/manage-patterns-and-rules
