一键导入
mai-setup
Use when setting up maitake in a repo for the first time, configuring sync to a remote, or troubleshooting the setup.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when setting up maitake in a repo for the first time, configuring sync to a remote, or troubleshooting the setup.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when a repo needs durable mai-backed context so every agent sees rules, rationale, and hazards before editing code. Covers promoting chat knowledge into tickets, constraints, warnings, ADRs, artifacts, and reviews; mirroring critical items into AGENTS.md; and enforcing mai context usage through arrival rituals, delegation templates, review gates, and verification.
Use when recording architecture decisions (ADRs). Decisions are kind:decision notes attached to code via --target, queryable via mai ls/context, and optionally materialize as markdown files. Covers detection triggers, tier system, comment templates, and anti-patterns.
Use when working in any git repo with maitake. Check for notes before touching files, leave notes after meaningful work. This is the base agent contract — all other mai skills build on it.
Use when setting or checking project rules that all agents must follow. Constraints show up in mai context alongside tickets and warnings. They stay open until the rule changes.
Use when coordinating work across multiple agents via teams. Create tickets, delegate, track deps, monitor progress, run reviews — all through mai.
Use when creating, reviewing, or merging pull requests through mai. Git-native PRs stored as notes — no GitHub, no Forgejo, no platform lock-in. Covers creation, review (accept/reject), submission (merge), auto-close, and diff inspection.
| name | mai-setup |
| description | Use when setting up maitake in a repo for the first time, configuring sync to a remote, or troubleshooting the setup. |
mai init # local only — no remote, no push
mai init --remote forgejo # enable auto-push to a remote
mai init --remote forgejo --block github.com # push to forgejo, block github
This creates:
.maitake/hooks/pre-write — scans for secrets before every note write.maitake/config.toml — sync remote + blocked hosts.gitignore entry — keeps .maitake/ out of the repoTip: Long notes use the pipe pattern — write to
/tmp, pipe intomai add-note. (See mai-agent skill.)
| Flag | What | Example |
|---|---|---|
--remote <name> | Push notes to this git remote after every write | --remote forgejo |
--block <host> | Never push notes to this host (repeatable) | --block github.com |
--remote → notes are local only, nothing pushes anywheregithub.com (even when a remote is configured).maitake/config.toml:
[sync]
remote = "forgejo"
blocked-hosts = ["github.com", "gitlab.com"]
[docs]
sync = "auto" # "auto" | "manual" | "off"
dir = ".mai-docs"
[hooks]
pre-write = true
post-push = true
Edit directly or re-run mai init. Legacy flat-format config files are still read for backwards compatibility.
When a remote is configured, every mai create, mai close, mai add-note, etc. auto-pushes refs/notes/maitake to the remote.
If the push is rejected (remote diverged):
cat_sort_uniq (set-union on note lines)mai sync
Fetch + merge + push in one command. Use after cloning a repo that already has notes on the remote.
Git notes don't push with git push — git ignores refs/notes/* by default.
maitake only pushes to the remote you configure in .maitake/config.toml.
Blocked hosts are checked before every push. No remote configured = nothing
leaves your machine.
git clone <url>
cd repo
mai init --remote origin
mai sync # pulls existing notes from remote
mai ls # see the work queue
mai search "topic" # search across all notes
.maitake/hooks/pre-write runs before every note write. It receives the JSON note content on stdin. Exit non-zero to reject.
Default hook: tries gitleaks, falls back to regex patterns for common secrets (AWS keys, GitHub tokens, private keys, JWTs).
Replace with your own:
# Custom pre-write hook
cat > .maitake/hooks/pre-write << 'EOF'
#!/bin/bash
set -euo pipefail
# Your custom scanning here
my-scanner --stdin
EOF
chmod +x .maitake/hooks/pre-write
mai doctor # graph health, note counts, broken edges
mai ls --status=all # everything including closed
mai kinds # what kinds of notes exist
git notes --ref=refs/notes/maitake list # raw git notes list