home / skills / cameronapak / bknd-skills / btca-bknd-repo-learn

btca-bknd-repo-learn skill

/skills/btca-bknd-repo-learn

This skill helps you query bknd repos with btca to learn module structures, authentication, media handling, adapters, and debugging effectively.

npx playbooks add skill cameronapak/bknd-skills --skill btca-bknd-repo-learn

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
2.7 KB
---
name: btca-bknd-repo-learn
description: Use btca (Better Context App) to efficiently query and learn from the bknd backend framework. Use when working with bknd for (1) Understanding data module and schema definitions, (2) Implementing authentication and authorization, (3) Setting up media file handling, (4) Configuring adapters (Node, Cloudflare, etc.), (5) Learning from bknd source code and examples, (6) Debugging bknd-specific issues
---

# Query bknd with btca

btca is a CLI tool for asking questions about git repos. It clones repositories, indexes them, and answers queries using AI.

## Quick Setup

```bash
# Install btca and OpenCode
bun add -g btca opencode-ai

# Configure model (Big Pickle: free, fast, surprisingly good)
btca config model --provider opencode --model big-pickle

# Add bknd as a resource
btca config resources add --name bknd --type git --url https://github.com/bknd-io/bknd --branch main
```

Or create `btca.config.jsonc`:
```jsonc
{
  "$schema": "https://btca.dev/btca.schema.json",
  "model": "big-pickle",
  "provider": "opencode",
  "providerTimeoutMs": 300000,
  "resources": [
    {
      "type": "git",
      "name": "bknd",
      "url": "https://github.com/bknd-io/bknd",
      "branch": "main"
    }
  ]
}
```

## Core Commands

### Ask a question
```bash
btca ask --resource bknd --question "How do I define a schema?"
```

### Interactive chat
```bash
btca chat --resource bknd
```

### Launch TUI
```bash
btca
```

## Reference Files

For detailed information, see:

- **[setup.md](references/setup.md)** - Full installation, configuration options, resource management, troubleshooting setup issues
- **[query-patterns.md](references/query-patterns.md)** - Specific query patterns for data, auth, media, adapters, and framework integration
- **[advanced.md](references/advanced.md)** - Multi-resource queries, interactive workflows, performance optimization, debugging

## Query Best Practices

1. **Be specific** - "How do I define a schema with a one-to-many relation?" vs "How do I use the data module?"
2. **Provide context** - "I'm using Cloudflare Workers. How do I configure the database adapter?"
3. **Ask for examples** - "Show me a complete example of setting up password authentication"
4. **Reference specific files** - "How does src/App.ts initialize the modules?"

## Learning Workflow

1. **Explore high-level**: Ask about overall architecture and main modules
2. **Module deep-dive**: Use `btca chat --resource bknd` to focus on one module
3. **Implementation details**: Ask to see specific feature implementations
4. **Examples & patterns**: Query the examples directory for best practices

## Resources

- btca docs: https://btca.dev
- bknd docs: https://docs.bknd.io
- bknd repo: https://github.com/bknd-io/bknd

Overview

This skill teaches how to use btca (Better Context App) to efficiently query and bknd backend framework code and docs. It helps you discover schema definitions, auth flows, media handling, adapter configuration, and concrete examples in the bknd codebase. Use it to speed up learning, implementation, and debugging when working with bknd.

How this skill works

The skill configures btca to clone and index the bknd repository, then runs natural-language queries against the indexed source. You can run single-shot questions, interactive chat sessions, or the terminal UI to explore architecture, module implementations, and example patterns. The workflow highlights file references and extracts relevant code snippets or step-by-step instructions from the code and docs.

When to use it

  • When you need to understand bknd data modules and schema definitions
  • When implementing or reviewing authentication and authorization flows
  • When configuring media file handling, uploads, or storage adapters
  • When setting up adapters for Node, Cloudflare Workers, or other runtimes
  • When learning from bknd source code and real examples
  • When debugging bknd-specific issues or integration problems

Best practices

  • Be specific: include desired outcome, runtime (Node/Cloudflare), and target modules
  • Provide contextual details like branch, file paths, or lines when asking file-specific questions
  • Ask for complete examples (config, code, and commands) for faster implementation
  • Use interactive chat to deep-dive a single module and follow up iteratively
  • Combine btca queries with bknd docs links or example paths to validate answers

Example use cases

  • Ask: “How do I define a schema with a one-to-many relation in bknd?” and get file references and example code
  • Chat: focus on authentication to extract password and token setup from the codebase and examples
  • Configure adapters: query how to adapt the database layer for Cloudflare Workers or a Node adapter with step-by-step changes
  • Debug: point btca at an error stack and ask where the relevant module initializes or handles that flow
  • Learn: search examples directory to copy a working media upload flow (storage config, middleware, and client usage)

FAQ

What setup is required before asking questions?

Install btca and a supported AI provider, then add bknd as a git resource or create a btca.config.jsonc pointing to the bknd repo and branch.

Which commands are most useful?

Use btca ask --resource bknd --question "..." for one-shot queries, btca chat --resource bknd for interactive exploration, or run btca to open the TUI.