ワンクリックで
setup-cursor-copies
Setup Foundation Cursor Copies
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Setup Foundation Cursor Copies
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Canonical turn protocol for agents writing to Neotoma. Bounded retrieval on the user message, store user message PART_OF conversation with REFERS_TO edges to retrieved entities, store assistant reply the same way. Use this skill in any agent loop that should persist conversation state to Neotoma.
Session-end audit. Files remaining work as task entities and lists them as bullets, verifies all data intended for Neotoma storage from this session is actually stored, and persists what's missing. Invoke at the natural close of a working session, before context is lost.
Mid-session status report. Summarizes what's been achieved so far this session and what work remains, in succinct qualitative prose and bullets with only light technical detail. Read-only — stores nothing, files nothing. Invoke any time to take stock without closing the session.
Close a Neotoma working session — store the assistant reply and a session-close summary.
Retrieve the bounded context for the current session — recent interactions and relevant entities.
Begin a Neotoma working session — open a conversation and record the opening interaction.
| name | setup_cursor_copies |
| description | Setup Foundation Cursor Copies |
Sets up foundation cursor rules and commands in .cursor/. When foundation is a git submodule, creates symlinks (stays in sync with git submodule update). Otherwise creates independent copies.
setup_cursor_copies
or
setup cursor copies
This command runs the foundation setup script (foundation/scriptsscripts/setup_claude_instructions.sh.sh) which:
setup_cursor_rules.sh and creates symlinks from foundation to .cursor/ (single source of truth; updates apply with git submodule update)..cursor/.When run from the foundation repository itself, it also automatically runs the setup script in peer repositories (located at ../*) that include this foundation repo via symlink.
git submodule update (or any setup); symlinks keep .cursor/ in sync automatically.When foundation is a git submodule (this command delegates to setup_cursor_rules):
git submodule update)When foundation is a symlink or copy (this command uses copy mode):
Check if foundation exists:
foundation/ directory in repo root../foundation/ (parent directory)Execute the script:
./foundation/scriptsscripts/setup_claude_instructions.sh.sh
Or if foundation is in parent directory:
../foundation/scriptsscripts/setup_claude_instructions.sh.sh
If running from the foundation repository itself (detected by presence of agent_instructions/cursor_skills/ directory):
Get current repository absolute path:
CURRENT_REPO=$(pwd -P)
Find peer repositories in parent directory:
PARENT_DIR=$(dirname "$CURRENT_REPO")
for peer_repo in "$PARENT_DIR"/*; do
# Skip if not a directory or if it's the current repo
if [ ! -d "$peer_repo" ] || [ "$peer_repo" = "$CURRENT_REPO" ]; then
continue
fi
# Check if peer repo has foundation/ symlink pointing to this repo
if [ -L "$peer_repo/foundation" ]; then
SYMLINK_TARGET=$(readlink -f "$peer_repo/foundation" 2>/dev/null || readlink "$peer_repo/foundation")
if [ "$SYMLINK_TARGET" = "$CURRENT_REPO" ]; then
echo "Found peer repo with foundation symlink: $(basename "$peer_repo")"
# Run copy script in peer repo using absolute path
(cd "$peer_repo" && "$CURRENT_REPO/scriptsscripts/setup_claude_instructions.sh.sh" || echo "Failed to run in $(basename "$peer_repo")")
fi
fi
done
Behavior:
../* directoriesfoundation/ symlink pointing to current repoExpected output (when peer repos found):
[INFO] ✅ Cursor rules setup complete!
...
[INFO] Detected foundation repository - checking for peer repos...
[INFO] Found peer repo with foundation symlink: my-project
[INFO] Running copy setup script in my-project...
[INFO] Foundation is a git submodule; using symlinks (setup_cursor_rules)... (or copy mode)
...
[INFO] ✅ Cursor rules setup complete!
[INFO] ✓ Successfully updated my-project
[INFO] Updated 1 peer repo(s)
Check output:
.claude/rules/ for symlinks; .cursor/skills/ is populated from foundation skills..claude/rules/ and .cursor/skills/ for regular files (not symlinks).Expected output (submodule):
[INFO] Foundation is a git submodule; using symlinks (setup_cursor_rules)...
[INFO] Setting up cursor rules and commands...
[INFO] Creating symlinks for generic cursor rules...
✓ Linked security.mdc -> security.mdc
...
[INFO] ✅ Cursor rules setup complete!
[INFO] Foundation rules linked: X
[INFO] Foundation commands linked: Y
Expected output (copy mode):
[INFO] Setting up cursor rules and commands (copy mode)...
[INFO] Copying generic cursor rules...
✓ Copied security.mdc
...
[INFO] ✅ Cursor rules setup complete!
[INFO] Rules copied: X
[INFO] Commands copied: Y
When foundation is a submodule (symlinks):
.claude/rules/ contains symlinks to foundation/agent_instructions/cursor_rules/. .cursor/skills/ is populated from foundation/agent_instructions/cursor_skills/ (skills replace legacy commands). Updates to foundation apply when you re-run setup.When foundation is not a submodule (copies):
.claude/rules/ and .cursor/skills/ contain independent copies of foundation rules and skills (e.g. security.mdc, worktree_env.mdc, and full skill workflows). Re-run to refresh after foundation updates.Note: Repository rules from docs/ are handled per setup_cursor_rules (symlinks when submodule) or copied in copy mode. Source files in docs/ remain the source of truth.
Filenames:
security.mdc remains security.mdc.Submodule (symlinks): Removes existing foundation files (symlinks or copies), then creates symlinks. Repo rules from docs/ are symlinked; any existing file at the target path (symlink or regular file) is removed and replaced with the symlink to the source.
Copy mode: Removes existing foundation files, then creates copies. Repo rules from docs/ are copied.
Existing Files: If a target already exists (symlink or regular file), it is removed and replaced with the symlink (or copy in copy mode). Source in docs/ or foundation is the single source of truth.
Existing Foundation Files: Removed first (prefixed and unprefixed), then new symlinks or copies created. Ensures output matches current foundation.
Copy mode only: Files are independent; foundation changes do not apply until you re-run. You can customize copies.
Error:
[ERROR] Foundation directory not found. Please run from repository root or ensure foundation is installed.
Solution:
Error:
[ERROR] Cursor rules directory not found: foundation/agent_instructions/cursor_rules
Solution:
git submodule update --initFoundation workflows are in foundation/agent_instructions/cursor_skills/. If present, setup copies them to .cursor/skills/. If the directory is missing, setup still succeeds (rules only).
foundation/scriptsscripts/setup_claude_instructions.sh.sh - Entry script (delegates to symlink or copy logic)foundation/scripts/setup_cursor_rules.sh - Symlink implementation (used when foundation is submodule)foundation/agent_instructions/README.md - Cursor rules and commands documentationfoundation/README.md - Foundation overview and installationgit submodule update.docs/; symlinked or copied per mode. Source in docs/ remains source of truth.../* that have foundation/ symlink to this repo.