share-docs
Share personal documents to the shared namespace with atomic git commit and push
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Share personal documents to the shared namespace with atomic git commit and push
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Generic migration orchestrator that reads CHANGELOG.md to understand and execute version-specific migrations
Determine feature slug interactively by auto-detecting next number and prompting user for description
Use when creating implementation plans to generate properly structured plans with phases, success criteria, and project references.
Use when documenting research findings to create properly structured research documents with frontmatter, sections, and file references.
ALWAYS check this skill before using grep, glob, Task tool, or doing any codebase exploration. Guides you to use specialized agents that are more efficient than basic tools.
Use when writing tests to ensure they follow project conventions. References patterns from thoughts/notes/testing.md.
| name | share-docs |
| description | Share personal documents to the shared namespace with atomic git commit and push |
Promote personal documents to the shared namespace for team collaboration. This skill handles numbering, frontmatter updates, and git operations atomically.
Check that the personal document exists and is ready to share:
thoughts/{username}/NNNN-slug/shared_as field yet (not already shared)git pull
Get latest shared documents to determine next available number.
Scan thoughts/shared/ for highest number:
NEXT_SHARED=$(ls -1 thoughts/shared/ 2>/dev/null | grep -E '^[0-9]{4}-' | sort -r | head -1 | cut -d'-' -f1 || echo "0000")
NEXT_SHARED=$(printf "%04d" $((10#${NEXT_SHARED} + 1)))
Copy entire personal directory to shared with new number:
# Example: thoughts/erik/0001-auth-system → thoughts/shared/0042-auth-system
cp -r thoughts/{username}/{NNNN}-{slug} thoughts/shared/${NEXT_SHARED}-{slug}
Personal copy (thoughts/erik/0001-auth-system/research.md):
---
feature_slug: "erik/0001-auth-system"
shared_as: "0042-auth-system"
shared_date: "2026-02-04"
status: shared
# ... other fields unchanged
---
Shared copy (thoughts/shared/0042-auth-system/research.md):
---
feature_slug: "0042-auth-system"
original_slug: "erik/0001-auth-system"
shared_date: "2026-02-04"
status: published
# ... other fields unchanged
---
Update frontmatter in all markdown files within both directories (research.md, plan.md, changelog.md, etc.).
Atomic operation to claim the shared number:
git add thoughts/shared/${NEXT_SHARED}-${slug} thoughts/${username}/${NNNN}-${slug}
git commit -m "feat: share ${slug} (was ${username}/${NNNN})"
git push
Important: If push fails due to conflict (someone else pushed a shared doc), retry from step 2.
✅ Shared ${username}/${NNNN}-${slug} → shared/${NEXT_SHARED}-${slug}
Personal copy marked with shared_as in frontmatter.
Collaborators can now access: thoughts/shared/${NEXT_SHARED}-${slug}/
Personal doc doesn't exist:
❌ Error: thoughts/erik/0001-auth-system not found
Already shared:
❌ Error: Document already shared as 0042-auth-system (check frontmatter)
Consider creating a new version if updates are needed.
Git push conflict:
⚠️ Push rejected - shared number conflict detected
Retrying with next available number...
Automatically retry from step 2 (pull, find next number, copy, commit, push).
# User has: thoughts/erik/0001-auth-system/research.md
# User runs: /share-docs thoughts/erik/0001-auth-system
# Skill executes:
git pull
# Finds next shared: 0042
cp -r thoughts/erik/0001-auth-system thoughts/shared/0042-auth-system
# Updates frontmatter in both
git add thoughts/shared/0042-auth-system thoughts/erik/0001-auth-system
git commit -m "feat: share auth-system (was erik/0001)"
git push
# Result:
# ✅ Shared erik/0001-auth-system → shared/0042-auth-system
Personal namespace (thoughts/{username}/):
Shared namespace (thoughts/shared/):
Benefits:
Personal copy remains unchanged except for frontmatter. You can:
The shared copy becomes the canonical version that others reference.