Skip to content

Claude Bridge Examples

Real-world examples of skills generated by Claude Bridge for Claude Code integration.

Overview

Claude Bridge converts Skill Engine skills into Claude Agent Skills format. This page shows actual generated output to help you understand what gets created.

Basic Example: Terraform Skill

Input: Skill Manifest

toml
# .skill-engine.toml
[[skills]]
name = "terraform"
description = "Infrastructure as Code with Terraform CLI"
source = "./terraform-skill"
runtime = "native"

[skills.tools.plan]
description = "Preview infrastructure changes"
parameters = [
  { name = "dir", type = "string", required = true, description = "Directory containing Terraform files" },
  { name = "var_file", type = "string", required = false, description = "Variable file path" }
]

[skills.tools.apply]
description = "Apply infrastructure changes"
parameters = [
  { name = "dir", type = "string", required = true, description = "Directory containing Terraform files" },
  { name = "auto_approve", type = "boolean", required = false, description = "Skip confirmation" }
]

Generated: SKILL.md

markdown
---
name: terraform
description: Infrastructure as Code with Terraform CLI
allowed-tools: Bash, skill-run
---

# Terraform Skill

Infrastructure as Code management through Terraform CLI integration.

## When to Use

- Planning infrastructure changes before applying
- Applying Terraform configurations to cloud providers
- Destroying infrastructure resources
- Validating and formatting Terraform files

## Requirements

- Terraform CLI installed and in PATH
- Valid cloud provider credentials configured
- Terraform files in working directory

## Tools Provided

### plan
Preview infrastructure changes without applying them.

**Parameters**:
- `dir` (required, string): Directory containing Terraform files
- `var_file` (optional, string): Variable file path

**MCP Usage**:
```typescript
await mcp.callTool('skill-engine/execute', {
  skill_name: 'terraform',
  tool_name: 'plan',
  parameters: {
    dir: './infrastructure',
    var_file: 'prod.tfvars'
  }
})

Script Usage:

bash
~/.claude/skills/terraform/scripts/plan.sh \
  --dir ./infrastructure \
  --var_file prod.tfvars

apply

Apply infrastructure changes to cloud providers.

Parameters:

  • dir (required, string): Directory containing Terraform files
  • auto_approve (optional, boolean): Skip confirmation prompt

MCP Usage:

typescript
await mcp.callTool('skill-engine/execute', {
  skill_name: 'terraform',
  tool_name: 'apply',
  parameters: {
    dir: './infrastructure',
    auto_approve: true
  }
})

Script Usage:

bash
~/.claude/skills/terraform/scripts/apply.sh \
  --dir ./infrastructure \
  --auto_approve true

Common Workflows

Plan and Apply

bash
# 1. Preview changes
skill run terraform plan --dir ./infrastructure

# 2. Apply if changes look good
skill run terraform apply --dir ./infrastructure --auto_approve false

Multi-Environment

bash
# Development
skill run terraform plan --dir ./infra --var_file dev.tfvars

# Production
skill run terraform plan --dir ./infra --var_file prod.tfvars

### Generated: TOOLS.md

```markdown
# Terraform Skill - Tool Reference

Detailed parameter documentation for all tools.

## plan

Preview infrastructure changes without applying them.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| dir | string | ✓ | Directory containing Terraform files |
| var_file | string | ✗ | Variable file path (e.g., prod.tfvars) |

### Examples

**Basic plan**:
```bash
skill run terraform plan --dir ./infrastructure

With variables:

bash
skill run terraform plan --dir ./infra --var_file prod.tfvars

MCP call:

json
{
  "skill_name": "terraform",
  "tool_name": "plan",
  "parameters": {
    "dir": "./infrastructure",
    "var_file": "prod.tfvars"
  }
}

apply

Apply infrastructure changes to cloud providers.

Parameters

NameTypeRequiredDescription
dirstringDirectory containing Terraform files
auto_approvebooleanSkip manual confirmation (default: false)

Examples

Interactive apply:

bash
skill run terraform apply --dir ./infrastructure

Auto-approve for CI/CD:

bash
skill run terraform apply \
  --dir ./infrastructure \
  --auto_approve true

MCP call:

json
{
  "skill_name": "terraform",
  "tool_name": "apply",
  "parameters": {
    "dir": "./infrastructure",
    "auto_approve": true
  }
}

Safety Notes

  • Always run plan before apply
  • Use auto_approve carefully in production
  • Back up state files before major changes

### Generated: Scripts

**~/.claude/skills/terraform/scripts/plan.sh**:
```bash
#!/bin/bash
set -euo pipefail

# Claude Bridge generated script
# Wraps: skill run terraform plan

exec skill run terraform plan "$@"

~/.claude/skills/terraform/scripts/apply.sh:

bash
#!/bin/bash
set -euo pipefail

# Claude Bridge generated script
# Wraps: skill run terraform apply

exec skill run terraform apply "$@"

Advanced Example: GitHub Skill with Categories

Input: Enhanced Manifest

toml
[[skills]]
name = "github"
description = "GitHub repository and issue management"
source = "./github-skill"
runtime = "native"

[skills.categories]
repositories = ["list_repos", "create_repo", "delete_repo"]
issues = ["list_issues", "create_issue", "close_issue"]
pull_requests = ["list_prs", "create_pr", "merge_pr"]

[skills.tools.create_issue]
description = "Create a new issue in a repository"
category = "issues"
parameters = [
  { name = "repo", type = "string", required = true },
  { name = "title", type = "string", required = true },
  { name = "body", type = "string", required = false },
  { name = "labels", type = "string", required = false }
]
examples = [
  "skill run github create_issue --repo myrepo --title 'Bug report' --body 'Description'",
  "skill run github create_issue --repo myrepo --title 'Feature' --labels 'enhancement,priority-high'"
]

Generated: SKILL.md (with Categories)

markdown
---
name: github
description: GitHub repository and issue management
allowed-tools: Bash, skill-run
---

# GitHub Skill

Comprehensive GitHub management for repositories, issues, and pull requests.

## When to Use

- Creating and managing GitHub issues
- Opening and merging pull requests
- Managing repository settings
- Automating GitHub workflows

## Requirements

- GitHub CLI (gh) installed and authenticated
- Valid GitHub personal access token (for API access)
- Repository access permissions

## Tool Categories

### Repositories
Tools for managing repositories:
- `list_repos`: List all repositories
- `create_repo`: Create a new repository
- `delete_repo`: Delete a repository

### Issues
Tools for issue tracking:
- `list_issues`: List repository issues
- `create_issue`: Create a new issue
- `close_issue`: Close an existing issue

### Pull Requests
Tools for pull request management:
- `list_prs`: List open pull requests
- `create_pr`: Create a new pull request
- `merge_pr`: Merge an approved pull request

## Tools Provided

### create_issue (Issues)
Create a new issue in a repository.

**Parameters**:
- `repo` (required, string): Repository name (owner/repo)
- `title` (required, string): Issue title
- `body` (optional, string): Issue description
- `labels` (optional, string): Comma-separated labels

**Examples**:

Simple issue:
```bash
skill run github create_issue \
  --repo myorg/myrepo \
  --title "Bug in login flow"

With description and labels:

bash
skill run github create_issue \
  --repo myorg/myrepo \
  --title "Add dark mode" \
  --body "Users have requested dark mode support" \
  --labels "enhancement,ui"

MCP call:

typescript
await mcp.callTool('skill-engine/execute', {
  skill_name: 'github',
  tool_name: 'create_issue',
  parameters: {
    repo: 'myorg/myrepo',
    title: 'Bug in login flow',
    body: 'Users are unable to login with SSO',
    labels: 'bug,priority-high'
  }
})

Common Workflows

Bug Report Flow

bash
# 1. Create issue
skill run github create_issue \
  --repo myorg/myrepo \
  --title "Login bug" \
  --labels "bug"

# 2. Create PR to fix
skill run github create_pr \
  --repo myorg/myrepo \
  --title "Fix login bug" \
  --body "Fixes #42"

# 3. Merge after approval
skill run github merge_pr \
  --repo myorg/myrepo \
  --pr_number 43

## Complex Example: Kubernetes with Streaming

### Input: Streaming-Enabled Tool

```toml
[[skills]]
name = "kubernetes"
description = "Kubernetes cluster management"
source = "./kubernetes-skill"
runtime = "native"

[skills.tools.logs]
description = "Stream container logs"
streaming = true
parameters = [
  { name = "pod", type = "string", required = true },
  { name = "namespace", type = "string", required = false, default = "default" },
  { name = "follow", type = "boolean", required = false, default = true },
  { name = "tail", type = "number", required = false }
]

Generated: SKILL.md (with Streaming Support)

markdown
---
name: kubernetes
description: Kubernetes cluster management
allowed-tools: Bash, skill-run
---

# Kubernetes Skill

## Tools Provided

### logs (Streaming)
Stream container logs in real-time.

**⚠️ This tool supports streaming output.**

**Parameters**:
- `pod` (required, string): Pod name
- `namespace` (optional, string): Namespace (default: "default")
- `follow` (optional, boolean): Follow log output (default: true)
- `tail` (optional, number): Number of lines to show from end

**Streaming Usage**:
```typescript
// MCP streaming call
const stream = await mcp.streamTool('skill-engine/execute', {
  skill_name: 'kubernetes',
  tool_name: 'logs',
  parameters: {
    pod: 'my-pod',
    namespace: 'production',
    follow: true
  }
});

for await (const chunk of stream) {
  console.log(chunk);
}

Script Usage (streaming):

bash
# Logs will stream to stdout
~/.claude/skills/kubernetes/scripts/logs.sh \
  --pod my-pod \
  --namespace production \
  --follow true

Examples:

Follow logs:

bash
skill run kubernetes logs --pod my-pod --follow true

Last 100 lines:

bash
skill run kubernetes logs --pod my-pod --follow false --tail 100

## Output Structure

For every skill, Claude Bridge generates this structure:

~/.claude/skills/{skill-name}/ ├── SKILL.md # Main instructions (required by Claude) ├── TOOLS.md # Detailed reference (optional) └── scripts/ # Fallback scripts ├── tool1.sh ├── tool2.sh └── toolN.sh


### File Sizes

Typical generated file sizes:

- **SKILL.md**: 5-20 KB (depends on tool count)
- **TOOLS.md**: 2-10 KB (detailed parameters)
- **Scripts**: ~100 bytes each (minimal wrappers)

### Generation Speed

- 1 skill: < 5 seconds
- 10 skills: < 30 seconds
- 50 skills: < 120 seconds

## Usage in Claude Code

Once generated, Claude Code automatically discovers these skills:

You: "Create a GitHub issue for the login bug"

Claude: I'll use the github skill to create an issue. [Reads ~/.claude/skills/github/SKILL.md] [Executes via MCP or script]

    Created issue #42: "Login bug"
    URL: https://github.com/myorg/myrepo/issues/42

## Customization

### Custom SKILL.md Content

Add a `SKILL.md` file to your skill directory to enhance generated output:

**Input**: `./terraform-skill/SKILL.md`
```markdown
# Terraform Skill

## Prerequisites

- Terraform 1.5+ installed
- AWS credentials configured
- S3 backend for state storage

## Best Practices

1. Always run `plan` before `apply`
2. Use workspaces for multiple environments
3. Enable remote state locking
4. Tag all resources appropriately

Claude Bridge will merge this content with generated tool documentation.

Override Templates

Create custom templates in ~/.config/skill-engine/templates/:

templates/
├── SKILL.md.hbs         # Handlebars template for SKILL.md
├── TOOLS.md.hbs         # Handlebars template for TOOLS.md
└── script.sh.hbs        # Handlebars template for scripts

Then:

bash
skill claude-bridge generate --template-dir ~/.config/skill-engine/templates

Troubleshooting Generated Skills

Skills Not Appearing

bash
# Verify generation
ls -la ~/.claude/skills/

# Check YAML frontmatter
head -5 ~/.claude/skills/kubernetes/SKILL.md

# Restart Claude Code

Scripts Not Executing

bash
# Fix permissions
chmod +x ~/.claude/skills/*/scripts/*.sh

# Test directly
~/.claude/skills/kubernetes/scripts/get.sh --resource pods

MCP Not Working

bash
# Verify MCP server running
ps aux | grep "skill serve"

# Check Claude Code config
cat ~/.config/claude/mcp.json

# Test MCP manually
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | skill serve

Next Steps

Released under the Apache-2.0 License.