spec-metadata

nstrayer's avatarfrom nstrayer

Generates metadata for research documents and specifications including date/time, git commit, branch, and repository info. Use when creating research documents, handoffs, or any documentation that needs timestamp and git metadata.

0stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026

When & Why to Use This Skill

The spec-metadata Claude skill automates the creation of standardized metadata for technical documentation, research papers, and project specifications. By leveraging Bash tools to extract real-time Git repository information—including commit hashes, branch names, and precise timestamps—it ensures that every document maintains a professional, traceable, and version-controlled audit trail, significantly improving documentation accuracy and workflow efficiency.

Use Cases

  • Research Documentation: Automatically generate and insert YAML frontmatter with precise timestamps and Git context when creating research files in shared directories.
  • Project Handoffs: Streamline the handoff process by including the exact repository state and commit hash, ensuring the receiving team has the correct technical context.
  • Implementation Planning: Maintain versioning integrity in technical specifications by embedding real-time metadata that links the document to the specific state of the codebase.
  • Audit Trails: Use the standardized filename timestamp and metadata format to create a searchable and organized history of project decisions and specifications.
namespec-metadata
descriptionGenerates metadata for research documents and specifications including date/time, git commit, branch, and repository info. Use when creating research documents, handoffs, or any documentation that needs timestamp and git metadata.
allowed-toolsBash

Spec Metadata Generator

This skill generates metadata for documentation files including research documents, handoffs, and specifications.

When to Activate

Activate this skill when:

  • Creating research documents in thoughts/shared/research/
  • Creating handoff documents in thoughts/shared/handoffs/
  • Creating implementation plans
  • Any documentation that needs timestamp and git metadata

Process

1. Collect Metadata

Run the following commands to gather all necessary metadata:

# Current date/time with timezone
date '+%Y-%m-%d %H:%M:%S %Z'

# Timestamp for filename
date '+%Y-%m-%d_%H-%M-%S'

# Git information
git rev-parse --show-toplevel  # Repo root
basename "$(git rev-parse --show-toplevel)"  # Repo name
git branch --show-current  # Current branch
git rev-parse HEAD  # Current commit hash

2. Output Format

Present the metadata to the user in this format:

Current Date/Time (TZ): [date with timezone]
Current Git Commit Hash: [commit hash]
Current Branch Name: [branch name]
Repository Name: [repo name]
Timestamp For Filename: [filename timestamp]

3. Usage in Documents

This metadata should be used in YAML frontmatter:

---
date: [Current date and time with timezone in ISO format]
git_commit: [Current commit hash]
branch: [Current branch name]
repository: [Repository name]
last_updated: [Current date in YYYY-MM-DD format]
---

Notes

  • The filename timestamp format uses underscores and 24-hour time (e.g., 2025-01-08_13-55-22)
  • Always include timezone information in the date field
spec-metadata – AI Agent Skills | Claude Skills