# 🔪 Camknife Skills

[![npm version](https://img.shields.io/npm/v/camknife-skills.svg)](https://www.npmjs.com/package/camknife-skills)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Bun](https://img.shields.io/badge/Bun-1.0+-black?logo=bun)](https://bun.sh)

A curated collection of AI agent skills for content creation, image generation, and knowledge management. Designed to work seamlessly with OpenClaw, Cline, Cursor, Trae, and other AI agent platforms.

> **Camknife** = Content + AI + Multi-tool Knowledge Workflow

---

## 📦 Installation

### Using npx (Recommended)

```bash
# List all available skills
npx camknife-skills list

# Get info about a specific skill
npx camknife-skills info baoyu-cover-image

# Install a skill to your project
npx camknife-skills install baoyu-cover-image ./my-skills
```

### Using Bun

```bash
# Bun users can use bunx for faster execution
bunx camknife-skills list

# Or install globally
bun install -g camknife-skills
camknife-skills list
```

### Using npm

```bash
npm install -g camknife-skills
camknife-skills list
```

---

## 🎯 Available Skills

### 🎨 Image Generation

| Skill | Description | Version |
|-------|-------------|---------|
| [baoyu-cover-image](./skills/baoyu-cover-image) | Generates article cover images with 5 dimensions (type, palette, rendering, text, mood) combining 11 color palettes and 7 rendering styles. Supports cinematic (2.35:1), widescreen (16:9), and square (1:1) aspects. | 1.56.2 |
| [jimeng-cover](./skills/jimeng-cover) | Generates cover images using Jimeng (即梦) AI from prompt files. Optimized for Chinese image generation with Volcengine API. | 1.0.0 |

### 📢 Content Publishing

| Skill | Description | Version |
|-------|-------------|---------|
| [baoyu-post-to-wechat](./skills/baoyu-post-to-wechat) | Posts content to WeChat Official Account (微信公众号) via API or Chrome CDP. Supports article posting (文章) with HTML, markdown, or plain text input, and image-text posting (贴图) with multiple images. | 1.56.1 |

### 🧠 Knowledge Management

| Skill | Description | Version |
|-------|-------------|---------|
| [karpathy-wiki](./skills/andrej-karpathy-wiki-skills) | LLM-driven personal knowledge management system based on Andrej Karpathy's LLM Wiki pattern. Four-stage pipeline: Ingest → Compile → Query → Lint. Obsidian-first with bidirectional linking. | 2.0.0 |

---

## 🚀 Quick Start

### 1. Browse Available Skills

```bash
npx camknife-skills list
```

Output:
```
════════════════════════════════════════════════════════════
  Available Skills
════════════════════════════════════════════════════════════


📁 Image Generation
──────────────────────────────────────────────────
  🔹 baoyu-cover-image v1.56.2
     Generates article cover images with 5 dimensions...
  🔹 jimeng-cover v1.0.0
     Generates cover images using Jimeng (即梦) AI...

📁 Content Publishing
──────────────────────────────────────────────────
  🔹 baoyu-post-to-wechat v1.56.1
     Posts content to WeChat Official Account...

📁 Knowledge Management
──────────────────────────────────────────────────
  🔹 karpathy-wiki v2.0.0
     LLM-driven personal knowledge management system...

Total: 4 skills
```

### 2. Install a Skill

```bash
# Install to default .skills directory
npx camknife-skills install baoyu-cover-image

# Install to custom directory
npx camknife-skills install baoyu-cover-image ./my-custom-skills
```

### 3. Install All Skills

```bash
npx camknife-skills install-all
```

---

## 🤖 Agent Platform Compatibility

| Platform | Status | Installation Method |
|----------|--------|---------------------|
| **OpenClaw** | ✅ Full Support | Auto-discovery via `registry.json` |
| **Cline** | ✅ Supported | Manual: Copy to `.cline/skills/` |
| **Cursor** | ✅ Supported | Manual: Copy to `.cursor/skills/` |
| **Trae** | ✅ Supported | Manual: Copy to `.trae/skills/` |
| **Roo Code** | ✅ Supported | Manual: Copy skill directory |

### Using with OpenClaw

OpenClaw automatically discovers skills from this registry. Just reference the skill by name:

```yaml
# In your OpenClaw workflow
skills:
  - name: baoyu-cover-image
    trigger: "generate cover image"
```

### Using with Cline / Cursor / Trae

```bash
# 1. Install the skill
npx camknife-skills install baoyu-cover-image ./.cline/skills

# 2. The agent will automatically detect and load SKILL.md
```

---

## 📁 Skill Structure

Each skill follows a standardized structure:

```
skills/
└── {skill-name}/
    ├── SKILL.md              # Main skill definition (REQUIRED)
    ├── scripts/              # Implementation scripts
    │   ├── generate.py
    │   └── helpers.ts
    ├── references/           # Documentation and guides
    │   ├── config/
    │   ├── workflow/
    │   └── api-reference.md
    └── assets/               # Templates and static files
        └── templates/
```

### SKILL.md Format

```markdown
---
name: skill-name
description: Brief description of what this skill does
version: 1.0.0
metadata:
  openclaw:
    homepage: https://github.com/...
    requires:
      anyBins: [bun, npx]
---

# Skill Title

## User Input Tools
...

## Workflow
...

## Options
...
```

---

## 🛠️ Creating Your Own Skill

Want to contribute a skill? Follow these guidelines:

### 1. Skill Directory Structure

```bash
mkdir skills/my-skill
cd skills/my-skill

# Create SKILL.md with frontmatter
touch SKILL.md

# Add implementation
touch scripts/run.ts
```

### 2. SKILL.md Template

```markdown
---
name: my-skill
description: What this skill does and when to use it
version: 1.0.0
metadata:
  openclaw:
    homepage: https://github.com/yourrepo#my-skill
    requires:
      anyBins: [bun, node]
---

# My Skill

## User Input Tools
When this skill prompts the user, follow this tool-selection rule...

## Workflow
Step-by-step instructions for the agent...

## Options
| Option | Description |
|--------|-------------|
| --flag | Description |

## References
Link to reference docs...
```

### 3. Submit a PR

1. Fork this repository
2. Add your skill to `skills/`
3. Update `registry.json` with your skill's metadata
4. Submit a pull request

---

## 📝 CLI Reference

### Commands

| Command | Description |
|---------|-------------|
| `list` | List all available skills |
| `info <skill>` | Show detailed information about a skill |
| `install <skill> [dir]` | Install a skill to target directory |
| `install-all [dir]` | Install all skills |
| `registry` | Preview the registry.json |
| `help` | Show help message |

### Examples

```bash
# Get help
npx camknife-skills help

# List skills
npx camknife-skills list

# Show skill details
npx camknife-skills info baoyu-cover-image

# Install to current project
npx camknife-skills install baoyu-cover-image

# Install to specific directory
npx camknife-skills install baoyu-cover-image ./custom/path

# Install all skills
npx camknife-skills install-all ./my-skills
```

---

## 🔧 Requirements

### For Users

- **Node.js**: >= 18.0.0
- **Bun**: >= 1.0.0 (recommended for faster execution)

### For Individual Skills

Each skill may have its own requirements:

| Skill | Requirements |
|-------|-------------|
| baoyu-cover-image | Python 3.10+, Optional: Bun |
| baoyu-post-to-wechat | Bun 1.0+, Chrome (for CDP mode) |
| karpathy-wiki | Python 3.10+, Obsidian |
| jimeng-cover | Python 3.10+, volcengine SDK |

---

## 🤝 Contributing

We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.

### Ways to Contribute

- 🐛 Report bugs
- 💡 Suggest new skills
- 📝 Improve documentation
- 🔧 Submit bug fixes
- ✨ Add new skills

---

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.

Individual skills may have their own licenses - check each skill's directory for details.

---

## 🙏 Acknowledgments

- **Andrej Karpathy** - For the LLM Wiki pattern that inspired the knowledge management skill
- **宝玉 (JimLiu)** - For creating the original baoyu-skills collection
- **OpenClaw Team** - For the skill specification and ecosystem
- **Contributors** - Thanks to all who have contributed skills and improvements

---

## 📬 Support

- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/JimLiu/camknife-skills/issues)
- 💬 **Discussions**: [GitHub Discussions](https://github.com/JimLiu/camknife-skills/discussions)
- 📧 **Email**: Create an issue for private inquiries

---

## 🔮 Roadmap

- [ ] Add more image generation skills (Midjourney, DALL-E, Stable Diffusion)
- [ ] Add social media publishing skills (Twitter, LinkedIn, Xiaohongshu)
- [ ] Add code generation and refactoring skills
- [ ] Create a web UI for skill browsing
- [ ] Add skill testing framework
- [ ] Support for skill versioning and auto-updates

---

<div align="center">

**Made with ❤️ by the AI agent community**

[⭐ Star us on GitHub](https://github.com/JimLiu/camknife-skills) • [📖 Documentation](https://github.com/JimLiu/camknife-skills#readme) • [🐛 Report Issue](https://github.com/JimLiu/camknife-skills/issues)

</div>
