Repo Setup logo

Repo Setup

Community
minghinmatthewlam
repo-setup

Set up or refactor a repository so agents naturally follow its intended architecture and important mistakes fail mechanically. Use when the user invokes $repo-setup, asks to make a repo agent-friendly, or wants important repository rules enforced through structure, types, tooling, tests, or CI.

Overview

Publisherminghinmatthewlam
Repositoryagent-guards
Skill namerepo-setup
Stars
46
Forks
3
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by minghinmatthewlam on GitHub. Read the source before you install it.

Installation

Install the Repo Setup AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/minghinmatthewlam/agent-guards/tree/main/skills/repo-setup
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/minghinmatthewlam/agent-guards.git /tmp/agent-guards
mkdir -p .claude/skills
cp -r /tmp/agent-guards/skills/repo-setup .claude/skills/repo-setup
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Repo Setup in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Repo Setup on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Repo Setup is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Repo Setup

Agents take shortcuts and copy nearby patterns. Shape the repository so the shortest, most obvious implementation follows the intended architecture. Make important wrong paths impossible or fail early instead of relying on reminders.

Understand The Repository

Read the source, build and test entrypoints, CI, static-analysis configuration, and existing instructions. Trace representative product flows to learn:

  • where a new feature naturally belongs;
  • which modules can change persistent state;
  • which shortcuts or recurring mistakes would be costly;
  • where external data is validated;
  • which local command proves a change is safe.

Separate the architecture the code currently has from the architecture the user actually wants. Present a concise mental model and the important choices before making judgment-heavy or broad structural changes. Ask only questions that can materially change the product or architecture.

Establish The Contract

Agree on the important rules for the repository. Focus on rules that prevent real confusion, coupling, or recurring mistakes, such as:

  • one obvious place to add each kind of feature;
  • one clear module or API that writes each persistent value;
  • simple code paths that make important invariants hard to bypass;
  • validation at external boundaries rather than scattered through the system;
  • one canonical local verification command that CI also runs.

Do not copy another repository's layout blindly. Use its principles only when they fit this product and codebase.

Make The Correct Path Easy

Remove misleading, duplicate, and bypass paths when safe. Prefer the strongest proportional mechanism that fits the rule:

  1. code structure, data models, or types that make the mistake impossible;
  2. dependency rules, lint, or static analysis that fail the build;
  3. one canonical API, helper, generator, or extension convention;
  4. focused tests or runtime checks;
  5. written instructions only when the decision requires human judgment.

Avoid speculative frameworks, broad compatibility layers, growing allowlists, and suppressions that hide existing violations. Improve the highest-value constraints first and keep the system easy to understand.

Prove Each New Constraint

Do not only show that normal code still works. Choose a real shortcut, past failure, or likely high-impact mistake from this repository. Reproduce the smallest safe example and show that the new structure or check rejects it with a clear failure. Remove the temporary violation, run the normal path again, and confirm that CI executes the same guard. Keep temporary violations out of the final change.

Learn From Failures

After an agent mistake or user correction, fix the immediate problem and ask: "Did the repository make this mistake easy?" If recurrence would be material, strengthen the owning structure or check and prove it catches the same class of failure. Do not add machinery for harmless one-off judgment errors.

Report

Use concisely. Explain the before-and-after mental model, enforced rules, commands and evidence, decisions made with the user, remaining prose-only constraints, and residual risk.

Gotchas

  • Do not treat the nearest existing pattern as the intended architecture.
  • Do not add import or package-boundary rules unless this repository needs them.
  • Do not encode an architectural choice before the user understands and accepts it.
  • Do not claim a guard works without showing it reject a representative violation.
  • Do not replace a simple repository with a complicated enforcement framework.
  • Do not leave both the new canonical path and the old shortcut in place by default.

Frequently asked questions

What does the Repo Setup AI skill do?

Set up or refactor a repository so agents naturally follow its intended architecture and important mistakes fail mechanically. Use when the user invokes $repo-setup, asks to make a repo agent-friendly, or wants important repository rules enforced through structure, types, tooling, tests, or CI.

Why use Repo Setup on TypingMind?

Because you install it once and use it with any model. Repo Setup is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Repo Setup in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/minghinmatthewlam/agent-guards/tree/main/skills/repo-setup. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Repo Setup?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Repo Setup?

As many as you like. As long as a model supports skills, you can use Repo Setup with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Repo Setup AI skill free?

Yes. It is published on GitHub by minghinmatthewlam under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇