Automatically log development sessions.
/plugin marketplace add imehr/dev-log-plugin/plugin install dev-log@imehr-marketplaceAutomatically log development sessions.
Root directory: ~/dev-log/ (configurable - check for dev-log.local.md in project's .claude/ directory)
CRITICAL: Run this FIRST, before any other logic.
Check if dev-log root directory is configured and exists:
Check for local config (highest priority):
if [ -f .claude/dev-log.local.md ]; then
# Extract root_directory from YAML frontmatter
ROOT_DIR=$(grep "^root_directory:" .claude/dev-log.local.md | sed 's/^root_directory: *//')
fi
If no local config, use default:
ROOT_DIR=${ROOT_DIR:-~/dev-log}
Check if directory exists:
if [ ! -d "$ROOT_DIR" ]; then
# Directory doesn't exist - ask user
fi
If directory doesn't exist, prompt user:
Use AskUserQuestion to ask:
Question: "The dev-log directory doesn't exist. Where would you like to store development logs?"
Options:
~/dev-log/) - Recommended for personal use./.dev-log/) - Project-specific logsBased on user choice:
mkdir -p "$ROOT_DIR/{projects,drafts}"echo '{"projects": {}}' > "$ROOT_DIR/index.json".claude/dev-log.local.md:
---
root_directory: /path/to/chosen/directory
---
# Dev-Log Configuration
This file stores your dev-log root directory preference for this project.
Expand tilde in paths:
ROOT_DIR="${ROOT_DIR/#\~/$HOME}"
Use $ROOT_DIR for all subsequent file operations instead of hardcoded ~/dev-log/.
Arguments: $ARGUMENTS
Mode detection:
$1 is "help" → Show help$1 is "show" → Show logs (use $2 for project or detect current)$1 is "list" → List all projects$1 is "interview" → Interview mode for content creation (Twitter, LinkedIn, blogs)$1 is "content" → Generate content from existing log$1 is "drafts" → List content drafts$1 is a project name → Auto-log to that projectCRITICAL: This is automatic. Do NOT ask questions.
Analyze the current conversation context and extract:
## YYYY-MM-DD HH:MM TZ
### Summary
[2-3 sentence overview of what was accomplished]
### Decisions Made
- [Decision 1]: [Rationale]
- [Decision 2]: [Rationale]
### Tools & SDKs
| Tool | Purpose | Notes |
|------|---------|-------|
| [name] | [what it was used for] | [version, config, etc.] |
### Accounts & Credentials
- [Service]: [account details, what was set up]
### Configuration
- [File path]: [what was changed/created]
### Key Commands
```bash
[significant commands that were run]
[Working/In Progress/Blocked/Exploratory]
Append entry to `$ROOT_DIR/projects/<project>.md`
Update `$ROOT_DIR/index.json`
## Project Detection
Detect project name using these methods in order:
1. Git remote: `git remote get-url origin 2>/dev/null | sed 's/.*\///' | sed 's/\.git$//'`
2. Git root dir: `basename "$(git rev-parse --show-toplevel 2>/dev/null)"`
3. Current directory: `basename "$(pwd)"`
Use provided argument if given (highest priority).
## Mode: Show Logs
If mode is "show":
1. Detect or use provided project name
2. Read `$ROOT_DIR/projects/<project>.md`
3. Display last 3 entries (or all if fewer)
## Mode: List Projects
If mode is "list":
Read `$ROOT_DIR/index.json` and display:
- Project name
- Last updated
- Entry count
Sort by most recent first.
## Mode: Interview (Content Creation Only)
**Use ONLY when user wants to create publishable content.**
Full 12-question capture for Twitter threads, LinkedIn posts, blog articles.
### Phase 1: What Happened (4 questions)
- Q1: What were you trying to accomplish?
- Q2: What specific tools/approaches did you use?
- Q3: Walk through the key moment
- Q4: How long did it take? Challenges?
### Phase 2: Why It Matters (3 questions)
- Q5: What surprised you most?
- Q6: Why is this different from usual?
- Q7: Who else struggles with this?
### Phase 3: Content Strategy (3 questions)
- Q8: Single most important insight?
- Q9: Which style? (Technical Observer / Enthusiastic Builder / Framework Teacher / Behind-the-Scenes)
- Q10: What would make someone care?
### Phase 4: Visual Capture (2 questions)
- Q11: What should be screenshotted?
- Q12: Would a recording add value?
Generate drafts to `$ROOT_DIR/drafts/YYYY-MM-DD-HHMM-<project>/`:
- twitter-thread.md
- linkedin-post.md
- screenshot-script.md
## Mode: Content
Generate publishable content from existing log entries:
1. Show recent entries
2. Ask which to convert
3. Ask platform(s): Twitter, LinkedIn, Blog, Dev.to
4. Ask writing style
5. Generate and save to drafts
## Mode: Drafts
List directories in `$ROOT_DIR/drafts/`
## Mode: Help
Read and display `${CLAUDE_PLUGIN_ROOT}/skills/dev-log/HELP.md`