specstory-project-stats
Scannednpx machina-cli add skill specstoryai/agent-skills/specstory-project-stats --openclawSpecStory Project Stats
Fetches project statistics from SpecStory's cloud platform, showing contributor counts, session activity, and other project metrics.
How It Works
- Identifies the project via
.specstory/.project.json, git remote, or folder name - Calls the SpecStory Cloud API
- Returns project statistics in JSON format
- Presents the data in a readable summary
Prerequisites
- Project must be synced to SpecStory Cloud
- Node.js must be available to run the script
Usage
Slash Command
| User says | Action |
|---|---|
/specstory-project-stats | Fetch stats for current project |
/specstory-project-stats | Same as above (no arguments needed) |
Direct Script Usage
# Fetch stats for current project
node skills/specstory-project-stats/scripts/get-stats.js
# With custom API endpoint (for development)
SPECSTORY_API_URL=http://localhost:5173 node skills/specstory-project-stats/scripts/get-stats.js
Output
The script outputs JSON with project statistics:
{
"project_id": "specstoryai/agent-skills",
"sessions": {
"total": 156,
"last_30_days": 47,
"last_7_days": 12
},
"contributors": {
"total": 5,
"active_last_30_days": 3
},
"activity": {
"first_session": "2025-10-15",
"last_session": "2026-01-28",
"avg_sessions_per_week": 8.2
}
}
Project ID Resolution
The script determines project ID in this order:
.specstory/.project.json- Usesgit_idorworkspace_idfield- Git remote - Extracts repo name from
originremote URL - Folder name - Falls back to current directory name
Error Handling
| Error | Meaning | Action |
|---|---|---|
| 404 | Project not found | Project needs to sync to SpecStory Cloud first |
| 401 | Unauthorized | API endpoint may require authentication |
| Network error | Can't reach API | Check internet connection |
Present Results to User
After fetching stats, present them in a friendly format:
Example Response (success)
Here are the stats for **specstoryai/agent-skills**:
**Sessions**
- Total: 156 sessions captured
- Last 30 days: 47 sessions
- Last 7 days: 12 sessions
**Contributors**
- Total: 5 contributors
- Active recently: 3
**Activity**
- First session: October 15, 2025
- Most recent: January 28, 2026
- Average: ~8 sessions per week
Your project has been actively using AI-assisted coding!
Example Response (404 error)
This project doesn't exist on SpecStory Cloud yet.
To get started:
1. Make sure you have SpecStory installed
2. Run `specstory sync` to push your local sessions to the cloud
3. Try this command again
Need help? Check the docs at https://docs.specstory.com
Environment Variables
| Variable | Default | Description |
|---|---|---|
SPECSTORY_API_URL | https://cloud.specstory.com | API endpoint |
Notes
- Statistics are fetched from SpecStory Cloud, not local history
- Project must have synced sessions to show meaningful stats
- The API is public and doesn't require authentication for basic stats
Source
git clone https://github.com/specstoryai/agent-skills/blob/main/skills/specstory-project-stats/SKILL.mdView on GitHub Overview
SpecStory Project Stats retrieves key metrics for your project from SpecStory Cloud, including sessions, contributors, and activity. It helps you monitor adoption, track usage trends, and surface insights you can act on.
How This Skill Works
The tool identifies the target project via .specstory/.project.json, git remote, or folder name, then calls the SpecStory Cloud API to fetch statistics. It returns the data in JSON and presents it as a readable summary.
When to Use It
- You want to see total sessions and activity for the current project
- You're checking contributor counts and who is active over the last 30 days
- You need to troubleshoot a missing project on SpecStory Cloud (404 or other errors)
- You are preparing a report or dashboard and need shareable stats
- You want to verify you have selected the correct project before syncing or debugging
Quick Start
- Step 1: Ensure the project is synced to SpecStory Cloud and Node is installed
- Step 2: Run the command line: node skills/specstory-project-stats/scripts/get-stats.js or trigger the slash command /specstory-project-stats
- Step 3: Read the JSON output or the friendly summary displayed
Best Practices
- Sync the project to SpecStory Cloud before querying stats
- Verify the API endpoint in the environment variable SPECSTORY_API_URL
- Use the project resolution method by .specstory/.project.json, git remote, or folder name
- Handle 404 and 401 errors by offering guidance to sync or authenticate
- Present results in a friendly summary rather than raw JSON for end users
Example Use Cases
- Fetch total sessions and last 7 days for the current project
- Check total contributors and active contributors in last 30 days
- Review first_session and last_session to gauge project velocity
- Diagnose a 404 by confirming the project has been synced to SpecStory Cloud
- Compare weekly average sessions across related projects for benchmarking