share-docs
Share personal documents to the shared namespace with atomic git commit and push
What this skill does
# Share Documents
Promote personal documents to the shared namespace for team collaboration. This skill handles numbering, frontmatter updates, and git operations atomically.
## When to Use
- When a research document is complete and ready for team review
- When a plan is finalized and ready for team implementation
- When you want to publish your work to collaborators
## Workflow
### 1. Validate Personal Document
Check that the personal document exists and is ready to share:
- Path format: `thoughts/{username}/NNNN-slug/`
- Contains required files (research.md, plan.md, etc.)
- Frontmatter is complete
- No `shared_as` field yet (not already shared)
### 2. Pull Latest Changes
```bash
git pull
```
Get latest shared documents to determine next available number.
### 3. Find Next Shared Number
Scan `thoughts/shared/` for highest number:
```bash
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)))
```
### 4. Copy to Shared
Copy entire personal directory to shared with new number:
```bash
# Example: thoughts/erik/0001-auth-system → thoughts/shared/0042-auth-system
cp -r thoughts/{username}/{NNNN}-{slug} thoughts/shared/${NEXT_SHARED}-{slug}
```
### 5. Update Frontmatter in Both Copies
**Personal copy** (`thoughts/erik/0001-auth-system/research.md`):
```yaml
---
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`):
```yaml
---
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.).
### 6. Commit and Push
Atomic operation to claim the shared number:
```bash
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.
### 7. Report Result
```
✅ 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}/
```
## Error Handling
**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).
## Example Usage
```bash
# 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
```
## Collaboration Model
**Personal namespace** (`thoughts/{username}/`):
- Each developer has their own numbering (0001, 0002, etc.)
- No conflicts between developers
- Work-in-progress, experimentation, drafts
- Not visible to others until shared
**Shared namespace** (`thoughts/shared/`):
- Canonical numbered documents for team
- Numbers assigned atomically at share time
- Published, reviewed, ready for implementation
- Visible to all collaborators
**Benefits**:
- No numbering conflicts during development
- Explicit sharing moment
- Clear distinction between WIP and published
- Git handles conflicts automatically
## After Sharing
Personal copy remains unchanged except for frontmatter. You can:
- Keep it as reference
- Continue working on improvements
- Share updates as a new document (new shared number)
- Delete it if no longer needed
The shared copy becomes the canonical version that others reference.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.