This template repository provides a complete setup for automating your development workflow using Linear, TaskMaster, and Claude Code. It creates an end-to-end pipeline from project planning to code implementation.
This template creates an automated workflow where:
- You create Teams in Linear (each representing a coding project/repo)
- Create issues in Linear with @claude mentions
- Claude automatically generates PRDs and breaks them into subtasks
- Tasks execute sequentially with real-time Linear updates
- PRs are created and linked back to Linear issues
- Zero API Key Configuration: Uses Claude Code's backend directly (no Anthropic API key needed)
- Automated PRD Generation: Converts Linear issues into detailed Product Requirements Documents
- Smart Task Breakdown: Uses TaskMaster to create dependencies and subtasks
- Real-time Sync: Keeps Linear and TaskMaster in perfect sync
- GitHub Actions Integration: Automatically triggers on @claude mentions
- Template-based Setup: Easily replicate across all your projects
claude-code-template/
βββ .github/
β βββ workflows/
β β βββ claude-code.yml # GitHub Actions workflow
β βββ ISSUE_TEMPLATE/
β βββ feature_request.md # Issue template
βββ .claude/
β βββ agents/
β β βββ linear-prd-generator.md # PRD generation agent
β β βββ task-executor.md # Task execution agent
β β βββ linear-sync.md # Linear synchronization agent
β βββ workflows/
β β βββ linear-taskmaster-flow.md # Main integration workflow
β βββ mcp.json # MCP server configuration
β βββ CLAUDE.md # Claude Code rules
βββ .taskmaster/
β βββ docs/
β βββ .gitkeep
βββ setup.sh # Auto-setup script
βββ README.md # This file
For Local Development (Claude Code):
# Add Linear as a global MCP server (uses OAuth, no API key needed)
claude mcp add linear --scope user --transport sse https://mcp.linear.app/sse
For GitHub Actions (Required): Get a Linear API key from Settings β API β Personal API keys, then add to GitHub secrets:
gh secret set LINEAR_API_KEY -b "lin_api_YOUR_KEY_HERE"
- Create a new repository on GitHub called
claude-code-template
- Copy all files from this directory to your repository
- Mark it as a template repository in GitHub settings
Add the following to your Claude Code MCP configuration:
For Claude Code (.claude/mcp.json
):
{
"mcpServers": {
"taskmaster-ai": {
"command": "npx",
"args": ["-y", "task-master-ai"],
"env": {
"PERPLEXITY_API_KEY": "${PERPLEXITY_API_KEY}"
}
},
"linear": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.linear.app/sse"]
}
}
}
Note: No Anthropic API key needed - TaskMaster automatically uses Claude Code's backend!
# Create new project from template
gh repo create my-new-project --template=yourusername/claude-code-template
cd my-new-project
./setup.sh
- Create Teams in Linear (one per project/repo)
- Enable GitHub sync for two-way issue synchronization
- Configure webhooks for @claude mentions
- Create an issue in Linear describing your feature
- Mention @claude in the description
- The GitHub Action automatically triggers
graph LR
A[Linear Issue] -->|@claude trigger| B[GitHub Action]
B --> C[PRD Generator Agent]
C --> D[TaskMaster Parse]
D --> E[Create Subtasks]
E --> F[Update Linear]
F --> G[Execute Tasks]
G --> H[Create PR]
H --> I[Link to Linear]
- Tasks execute sequentially based on dependencies
- Each task updates Linear status in real-time
- Commits are atomic and linked to tasks
- Final PR is created with all changes
Converts Linear issues into comprehensive PRDs:
- Extracts issue context
- Generates detailed requirements
- Creates implementation plan
- Updates Linear with PRD
Handles sequential task implementation:
- Respects dependencies
- Updates Linear status
- Creates atomic commits
- Maintains progress tracking
Keeps everything synchronized:
- Bidirectional updates
- Status synchronization
- Dependency management
- Real-time progress
The main configuration file that defines:
- Available subagents
- MCP server settings
- Workflow triggers
- Execution rules
Automatically configured to:
- Trigger on @claude mentions
- Use Claude Code Action v1
- Pass environment variables
- Execute workflows
Configure models in chat:
Change the main model to claude-code/sonnet
Available models (no API key needed):
claude-code/opus
- More powerfulclaude-code/sonnet
- Faster
- Create Linear issue: "Add user authentication with JWT"
- Add description with @claude mention
- Watch as:
- PRD is generated
- Tasks are created
- Implementation begins
- PR is opened
- Check Linear for real-time task updates
- View TaskMaster for detailed progress
- Review commits linked to tasks
- Track PR status
To update all projects when you change the template:
# In your project
git remote add template https://github.com/yourusername/claude-code-template
git fetch template
git merge template/main --allow-unrelated-histories
Required secrets in GitHub:
LINEAR_API_KEY
- REQUIRED for GitHub Actions (Linear MCP doesn't work headless)ANTHROPIC_API_KEY
- Optional when using Claude Code backendTASKMASTER_API_KEY
- Optional, for TaskMaster cloud featuresPERPLEXITY_API_KEY
- Optional, for research capabilities
Note: Linear MCP uses OAuth for local development, but GitHub Actions requires an API key since it runs headless.
- PRD Quality: The more detailed your Linear issue, the better the generated tasks
- Task Granularity: Keep tasks small and focused
- Dependencies: Define clear dependencies in your PRD
- Commit Messages: Let the system handle atomic commits
- Review: Always review generated PRs before merging
- Verify Claude Code CLI is installed
- Run
taskmaster models
to check available models - Select
claude-code/sonnet
orclaude-code/opus
- Check Linear GitHub integration
- Verify webhook configuration
- Ensure @claude is mentioned correctly
- Check workflow file is in
.github/workflows/
- Verify @claude mention format
- Check GitHub Actions is enabled
- TaskMaster Documentation
- Linear API Documentation
- Claude Code Documentation
- MCP Protocol Specification
Feel free to submit issues and enhancement requests!
MIT License - feel free to use this template for your projects
Created with β€οΈ for automated development workflows