···11+# Tangled Agent Skill
22+33+A platform-neutral Agent Skill for working with [Tangled.org](https://tangled.org/), the decentralized Git code hosting and collaboration platform built on AT Protocol.
44+55+This skill teaches Agent Skills-compatible AI coding agents how to use Tangled for repository hosting, Git operations, issues, pull requests, CI/CD workflows, webhooks, and AT Protocol-related troubleshooting.
66+77+## What this skill covers
88+99+- Tangled Git clone / push / pull / migration / mirroring workflows
1010+- GitHub-to-Tangled concept and command mapping
1111+- Tangled CLI usage patterns (`tang`, `tng`, `tangled`)
1212+- Issue and pull request workflows
1313+- SSH key and authentication troubleshooting
1414+- AT Protocol basics: handles, DIDs, PDS, AppView, knots
1515+- Spindles CI/CD workflows
1616+- Tangled webhooks
1717+1818+## What this skill does not include
1919+2020+- No MCP dependency
2121+- No embedded credentials or API keys
2222+- No private SSH keys
2323+- No executable scripts
2424+2525+It is intentionally written as Markdown-only skill documentation so it can be reused across Agent Skills-compatible and other skill-aware agent environments.
2626+2727+## Structure
2828+2929+```text
3030+tangled/
3131+├── SKILL.md
3232+└── references/
3333+ ├── atproto-troubleshooting.md
3434+ ├── cli.md
3535+ ├── git-ops.md
3636+ ├── github-mapping.md
3737+ ├── issues-prs.md
3838+ └── knots-spindles-webhooks.md
3939+```
4040+4141+## Installation
4242+4343+Copy the `tangled/` directory into a supported skills directory.
4444+4545+For global skill-aware agent environments:
4646+4747+```bash
4848+mkdir -p ~/.agents/skills
4949+cp -R tangled ~/.agents/skills/tangled
5050+```
5151+5252+For project-local usage:
5353+5454+```bash
5555+mkdir -p .agents/skills
5656+cp -R tangled .agents/skills/tangled
5757+```
5858+5959+Then start a new agent session so the skill metadata can be discovered.
6060+6161+## Usage examples
6262+6363+Ask your agent things like:
6464+6565+- "Clone this Tangled repo."
6666+- "Push this project to Tangled."
6767+- "Mirror this GitHub repo to Tangled."
6868+- "Create a Tangled issue for this bug."
6969+- "Open a Tangled pull request from this branch."
7070+- "Set up a Spindle workflow."
7171+- "Why is Tangled SSH push failing?"
7272+7373+## Primary references
7474+7575+- Tangled: https://tangled.org/
7676+- Tangled docs: https://docs.tangled.org/
7777+- Quick start: https://docs.tangled.org/quick-start-guide
7878+- Webhooks: https://docs.tangled.org/webhooks
7979+- `tang` CLI: https://github.com/onevcat/tang
8080+8181+## License
8282+8383+MIT, unless a future maintainer chooses a different license file for this repository.
+109
.agents/skills/tangled/SKILL.md
···11+---
22+name: tangled
33+description: Works with Tangled.org, the decentralized Git code hosting and collaboration platform built on AT Protocol. Use when the user mentions Tangled, tangled.org, knots, spindles, AT Protocol Git hosting, Tangled repositories, Tangled issues, Tangled pull requests, Tangled CI/CD, migrating or mirroring GitHub/GitLab repos to Tangled, or controlling Tangled with git/CLI commands. Does not require MCP.
44+---
55+66+# Tangled
77+88+Use this skill for Tangled.org repository work: creating, cloning, pushing, pulling, mirroring, migrating, managing issues/PRs, configuring SSH keys, and setting up Tangled CI/CD/webhooks.
99+1010+Tangled is not GitHub with a different domain. It is decentralized Git hosting built around AT Protocol identity, appviews, and repository hosting servers called knots. Prefer standard `git` for code transfer and a Tangled CLI for higher-level objects like issues and pull requests.
1111+1212+## First decisions
1313+1414+1. **Need only clone/push/pull/mirror?** Use standard Git commands. Read `references/git-ops.md`.
1515+2. **Need repo creation, SSH keys, issues, or PRs?** Use a Tangled CLI if available. Read `references/cli.md` and `references/issues-prs.md`.
1616+3. **Coming from GitHub/GitLab?** Read `references/github-mapping.md` and `references/git-ops.md`.
1717+4. **Need CI/CD or webhook automation?** Read `references/knots-spindles-webhooks.md`.
1818+5. **Authentication/identity is confusing?** Read `references/atproto-troubleshooting.md`.
1919+2020+## Safety and verification rules
2121+2222+- Before running commands that write to a repo or account, inspect the current repository and remotes with `git remote -v`, `git status`, and, if needed, the Tangled CLI status/context command.
2323+- Do not assume a Tangled CLI is installed. Check with `command -v tang`, `command -v tng`, and/or `command -v tangled`.
2424+- Do not install community CLIs globally without the user's approval. If a CLI is missing, explain the options and ask before installing.
2525+- Treat Tangled CLIs as community tools unless the source proves otherwise. Prefer official Tangled docs for Git/SSH/Spindle/Webhook behavior.
2626+- Never expose app passwords, PDS credentials, SSH private keys, tokens, or DID-linked account secrets in chat, logs, commits, or skill files.
2727+- If asked to migrate from GitHub/GitLab, state that Tangled's official docs describe Git history migration via remotes; issues and pull requests are not automatically migrated by the basic Git workflow.
2828+- If the user asks for MCP, say this skill intentionally avoids MCP and can be extended later if needed.
2929+3030+## Core workflows
3131+3232+### Clone a Tangled repo
3333+3434+Use the URL shown by Tangled when possible. Common forms:
3535+3636+```bash
3737+git clone https://tangled.org/OWNER/REPO
3838+git clone git@tangled.org:OWNER/REPO
3939+```
4040+4141+With the `tang` CLI, if installed:
4242+4343+```bash
4444+tang repo clone OWNER/REPO
4545+```
4646+4747+### Push an existing repo to Tangled
4848+4949+1. Confirm the user already created the Tangled repository or use a CLI to create it.
5050+2. Add or update the remote.
5151+3. Push branches and tags intentionally.
5252+5353+```bash
5454+git remote add tangled git@tangled.org:OWNER/REPO
5555+git push -u tangled main
5656+git push tangled --tags
5757+```
5858+5959+For a full migration:
6060+6161+```bash
6262+git push -u tangled --all
6363+git push -u tangled --tags
6464+```
6565+6666+### Mirror GitHub and Tangled
6767+6868+For separate control, prefer separate remotes:
6969+7070+```bash
7171+git remote add github git@github.com:OWNER/REPO.git
7272+git remote add tangled git@tangled.org:OWNER/REPO
7373+git push github main
7474+git push tangled main
7575+```
7676+7777+For one remote that pushes to both, see `references/git-ops.md`.
7878+7979+### Create issues and PRs
8080+8181+If a Tangled CLI is installed, prefer it over hand-crafting AT Protocol records:
8282+8383+```bash
8484+tang issue list
8585+tang issue create "Bug: title" --body "Details"
8686+tang pr create --base main --head my-branch --title "Add feature" --body-file ./pr.md
8787+```
8888+8989+Command names and flags differ across community CLIs. Verify with `tang --help`, `tng --help`, or `tangled --help` before executing.
9090+9191+## Reference files
9292+9393+- `references/github-mapping.md` — GitHub-to-Tangled concept and command mapping.
9494+- `references/git-ops.md` — clone, remote setup, migration, mirroring, SSH remotes.
9595+- `references/cli.md` — known Tangled CLI options and safe CLI selection.
9696+- `references/issues-prs.md` — issue and pull request workflows.
9797+- `references/knots-spindles-webhooks.md` — knots, Spindle CI/CD, webhooks.
9898+- `references/atproto-troubleshooting.md` — DID/PDS/handle basics and common failures.
9999+100100+## Primary sources
101101+102102+Use these as the source of truth when current behavior matters:
103103+104104+- Tangled docs: https://docs.tangled.org/
105105+- Quick start: https://docs.tangled.org/quick-start-guide
106106+- Single-page docs: https://docs.tangled.org/single-page
107107+- Webhooks: https://docs.tangled.org/webhooks
108108+- Tangled platform: https://tangled.org/
109109+- `tang` CLI repository: https://github.com/onevcat/tang
···11+# AT Protocol basics and troubleshooting
22+33+Use this when Tangled identity, authentication, SSH, appview visibility, or verification is confusing.
44+55+## Concepts
66+77+- **Handle**: human-readable AT Protocol identifier, often similar to a Bluesky handle.
88+- **DID**: decentralized identifier, stable identity used internally by AT Protocol records.
99+- **PDS**: Personal Data Server that stores the user's AT Protocol data.
1010+- **App password**: credential often used by CLIs to authenticate against a PDS. Treat as secret.
1111+- **AppView**: tangled.org's consolidated view into repositories and collaboration records.
1212+- **Knot**: server hosting Git repositories.
1313+1414+## Auth troubleshooting
1515+1616+Symptoms:
1717+1818+- CLI cannot login
1919+- CLI says token expired
2020+- wrong account/handle appears
2121+- issue/PR commands fail despite Git clone working
2222+2323+Checks:
2424+2525+```bash
2626+tang auth status
2727+# or equivalent CLI command
2828+2929+tang status
3030+```
3131+3232+Actions:
3333+3434+- Confirm handle/PDS URL.
3535+- Refresh or re-login with the CLI.
3636+- Use an app password, not the main account password, when the CLI expects app-password auth.
3737+- Do not paste credentials into chat or commit them.
3838+3939+## SSH troubleshooting
4040+4141+Symptoms:
4242+4343+- `Permission denied (publickey)`
4444+- clone/push fails over SSH
4545+- HTTPS clone works but SSH does not
4646+4747+Checks:
4848+4949+```bash
5050+git remote -v
5151+ssh -T git@tangled.org
5252+ssh -vT git@tangled.org
5353+```
5454+5555+Actions:
5656+5757+- Ensure the public key is added to Tangled.
5858+- Ensure the private key exists locally and is selected by SSH config.
5959+- If multiple keys exist, add a host block to `~/.ssh/config`.
6060+- After adding a key, allow for indexing/propagation delay if the CLI/docs mention it.
6161+6262+Example SSH config pattern:
6363+6464+```sshconfig
6565+Host tangled.org
6666+ HostName tangled.org
6767+ User git
6868+ IdentityFile ~/.ssh/id_ed25519
6969+ IdentitiesOnly yes
7070+```
7171+7272+## Repo visibility and empty repo issues
7373+7474+- A newly created empty repo may not resolve in all views until at least one commit is pushed.
7575+- Some community CLI docs note that records created outside the web UI may lag appview ingestion. If a repo/PR exists but is not visible on tangled.org, verify with CLI/context and check current platform issue status.
7676+7777+## Commit verification
7878+7979+If commits are not marked verified:
8080+8181+- Check whether Tangled supports the signature type being used.
8282+- Confirm the signing key is associated with the correct identity/account.
8383+- Verify local Git signing configuration.
8484+- Refer to the official Tangled troubleshooting docs for current behavior.
8585+8686+## General rule
8787+8888+When Tangled behavior differs from GitHub, do not force a GitHub mental model. Identify whether the issue is in Git transport, AT Protocol auth/records, appview indexing, or knot hosting.
+75
.agents/skills/tangled/references/cli.md
···11+# Tangled CLI reference
22+33+Tangled has multiple community CLIs. Do not assume one is installed or canonical. Verify before using.
44+55+## Detect available CLIs
66+77+```bash
88+command -v tang || true
99+command -v tng || true
1010+command -v tangled || true
1111+```
1212+1313+Then inspect help:
1414+1515+```bash
1616+tang --help
1717+# or
1818+tng --help
1919+# or
2020+tangled --help
2121+```
2222+2323+## Known CLIs
2424+2525+### `tang` by onevcat
2626+2727+Source: https://github.com/onevcat/tang
2828+2929+Designed for day-to-day Tangled repository work:
3030+3131+- `auth`: login, logout, token refresh, token inspection, auth status
3232+- `status`: combined auth, repo, and service status
3333+- `config`: knot, AppView, Constellation, preferred git remote, clone protocol
3434+- `ssh-key`: list/add/delete Tangled SSH public keys
3535+- `repo`: view/list/create/clone repositories
3636+- `issue`: list/create/view/edit/comment/close/reopen issues
3737+- `pr`: list/create/view/diff/comment/checkout/close/reopen/merge pull requests
3838+- `browse`: open Tangled pages from current repo context
3939+- `completion`: shell completions
4040+4141+Examples:
4242+4343+```bash
4444+tang auth status
4545+tang status
4646+tang config get clone.protocol
4747+tang config set clone.protocol ssh
4848+4949+tang ssh-key list
5050+tang repo clone OWNER/REPO
5151+tang repo create my-project --knot KNOT_HOST
5252+5353+tang issue list
5454+tang issue create "Bug: title" --body "Details"
5555+5656+git push origin my-branch
5757+tang pr create --base main --head my-branch --title "Add feature" --body-file ./pr.md
5858+```
5959+6060+Caveats from the README:
6161+6262+- `repo create` may require a create-capable knot; pass `--knot` when the default route is insufficient.
6363+- SSH clone may depend on Tangled's SSH key authorization index; after adding a key, retry after key list/index refresh.
6464+- PR merge uses Tangled's merge endpoint and may not support GitHub-style squash/rebase strategies.
6565+6666+### `tng` and other CLIs
6767+6868+Other community CLIs exist and may expose similar functions: auth, repo, issue, PR, SSH key, context/config. Their flags and output formats can differ. Use help output as the immediate source of truth.
6969+7070+## CLI selection policy
7171+7272+- If `tang` is installed, prefer it because it has broad documented coverage.
7373+- If another CLI is already installed in the user's environment, do not replace it without asking.
7474+- If no CLI is installed and the task can be done with Git, use Git.
7575+- If no CLI is installed and the task requires issues/PRs/repo creation, ask whether to install a CLI or use the Tangled web UI.
+90
.agents/skills/tangled/references/git-ops.md
···11+# Tangled Git operations
22+33+Use standard Git for clone, fetch, pull, push, remote migration, and mirroring.
44+55+## Inspect current repo
66+77+```bash
88+git status
99+git remote -v
1010+git branch --show-current
1111+```
1212+1313+## Common remote URL forms
1414+1515+Use the exact URL shown by Tangled when possible. Common examples:
1616+1717+```bash
1818+https://tangled.org/OWNER/REPO
1919+git@tangled.org:OWNER/REPO
2020+git@tangled.org:user.tngl.sh/my-project
2121+```
2222+2323+Older docs/examples may show `user.tngl.sh/my-project`; current repos may also use handle or DID forms. Verify from Tangled UI or CLI before writing remotes.
2424+2525+## Add Tangled as a separate remote
2626+2727+This is safest when the user wants explicit control.
2828+2929+```bash
3030+git remote add tangled git@tangled.org:OWNER/REPO
3131+git push -u tangled main
3232+git push tangled --tags
3333+```
3434+3535+## Change origin to Tangled
3636+3737+Use only when the user wants Tangled as the primary remote.
3838+3939+```bash
4040+git remote set-url origin git@tangled.org:OWNER/REPO
4141+git push -u origin --all
4242+git push -u origin --tags
4343+```
4444+4545+## Mirror while keeping GitHub as primary
4646+4747+### Separate remotes
4848+4949+```bash
5050+git remote add github git@github.com:OWNER/REPO.git
5151+git remote add tangled git@tangled.org:OWNER/REPO
5252+5353+git push github main
5454+git push tangled main
5555+```
5656+5757+### One remote with multiple push URLs
5858+5959+Use when the user wants `git push origin main` to push to both GitHub and Tangled.
6060+6161+```bash
6262+# Keep fetch URL as the primary remote, then reset push URLs explicitly.
6363+git remote set-url origin git@github.com:OWNER/REPO.git
6464+6565+git remote set-url --add --push origin git@github.com:OWNER/REPO.git
6666+git remote set-url --add --push origin git@tangled.org:OWNER/REPO
6767+6868+git remote -v
6969+git push origin main
7070+```
7171+7272+After adding multiple push URLs, `git remote -v` should show one fetch URL and multiple push URLs.
7373+7474+## Full migration
7575+7676+```bash
7777+git push -u tangled --all
7878+git push -u tangled --tags
7979+```
8080+8181+State clearly: this transfers Git refs and history, not GitHub issues, PRs, discussions, releases, or project metadata unless another tool handles them.
8282+8383+## SSH checks
8484+8585+```bash
8686+ssh -T git@tangled.org
8787+ssh -vT git@tangled.org
8888+```
8989+9090+If SSH fails, check that the public key is uploaded to Tangled, the correct key is selected in `~/.ssh/config`, and the repo URL matches the target owner/repo.
···11+# GitHub to Tangled mapping
22+33+Use this when translating familiar GitHub workflows into Tangled workflows.
44+55+| GitHub concept | Tangled equivalent / note |
66+|---|---|
77+| `github.com` | `tangled.org` appview plus distributed knots |
88+| GitHub user/org | AT Protocol handle/DID; repositories are associated with ATProto identity records and hosted on knots |
99+| GitHub repository hosting | Tangled knot hosting Git data |
1010+| GitHub web UI | Tangled appview at `tangled.org` |
1111+| `gh repo clone` | `git clone ...` or `tang repo clone OWNER/REPO` if CLI installed |
1212+| `gh repo create` | Tangled web UI or `tang repo create`/`tng repo create` if CLI installed and a create-capable knot is available |
1313+| GitHub Issues | Tangled issue records; use Tangled web UI or CLI |
1414+| GitHub Pull Requests | Tangled PR records and patches; use Tangled web UI or CLI |
1515+| GitHub Actions | Spindles workflows under `.tangled/workflows/` |
1616+| GitHub webhooks | Tangled webhooks; currently push events are documented |
1717+| GitHub SSH keys | Tangled SSH public keys, often managed through web UI or `tang ssh-key` |
1818+1919+## Important differences
2020+2121+- Tangled is decentralized. A repo may be visible through the appview but hosted by a knot.
2222+- Identity is AT Protocol based: handles, DIDs, and PDS matter for auth and record ownership.
2323+- Basic migration from GitHub/GitLab is Git history only: change/add remotes and push branches/tags. Issues/PRs are not migrated by plain Git.
2424+- PR merge strategies may be narrower than GitHub. The `tang` README notes no GitHub-style squash/rebase strategies for its current merge endpoint.
2525+- Community CLIs may lag platform behavior. Verify with current docs and CLI help.
+72
.agents/skills/tangled/references/issues-prs.md
···11+# Tangled issues and pull requests
22+33+Use this when the user asks to create, view, comment on, close, reopen, review, checkout, or merge Tangled issues/PRs.
44+55+## Before acting
66+77+1. Confirm the current repository context.
88+2. Check whether a Tangled CLI is installed.
99+3. Inspect command help because CLI flags differ.
1010+4. For write operations, summarize what will be created/changed before running commands when the action is not obviously requested.
1111+1212+```bash
1313+git remote -v
1414+command -v tang || command -v tng || command -v tangled || true
1515+```
1616+1717+With `tang`:
1818+1919+```bash
2020+tang status
2121+tang issue list
2222+tang pr list
2323+```
2424+2525+## Issues with `tang`
2626+2727+```bash
2828+tang issue list
2929+tang issue view 5
3030+tang issue create "Bug: title" --body "Detailed description"
3131+tang issue comment 5 --body "Comment text"
3232+tang issue close 5
3333+tang issue reopen 5
3434+```
3535+3636+If body content is long, prefer file/stdin patterns if supported:
3737+3838+```bash
3939+tang issue create "Bug: title" --body-file ./issue.md
4040+```
4141+4242+## Pull requests with `tang`
4343+4444+Typical flow:
4545+4646+```bash
4747+git checkout -b my-branch
4848+# edit files
4949+git push -u origin my-branch
5050+5151+tang pr create --base main --head my-branch --title "Add feature" --body-file ./pr.md
5252+```
5353+5454+Common operations:
5555+5656+```bash
5757+tang pr list
5858+tang pr view 3
5959+tang pr diff 3
6060+tang pr comment 3 --body "Looks good."
6161+tang pr checkout 3
6262+tang pr close 3
6363+tang pr reopen 3
6464+tang pr merge 3
6565+```
6666+6767+## Caveats
6868+6969+- Tangled PR identifiers may be numeric in appview contexts or ATProto rkeys in some CLIs. Use the CLI's list/view output to choose the correct identifier.
7070+- PR patches and comments may be stored as ATProto records/blobs depending on CLI implementation.
7171+- Do not assume GitHub semantics like squash merge, rebase merge, required reviews, or branch protection unless the current Tangled docs/CLI confirm them.
7272+- If the user asks to migrate GitHub issues/PRs, do not promise built-in migration. Treat it as a separate import/export project.
···11+# Knots, Spindles, and webhooks
22+33+Use this for Tangled hosting architecture, CI/CD, and automation.
44+55+## Knots
66+77+A knot is a lightweight headless server that hosts Git repositories. Tangled provides managed knots, and users can self-host knots for single-user, home-lab, or community setups.
88+99+Operational implications:
1010+1111+- Repo creation may require choosing a create-capable knot.
1212+- A repo can be accessible through the tangled.org appview while its Git data lives on a knot.
1313+- When a CLI asks for `--knot`, use the knot host intended to host the repository.
1414+- Self-hosted knot troubleshooting should rely on official docs and service logs.
1515+1616+## Spindles CI/CD
1717+1818+Spindles are Tangled's CI/CD workflows. Workflow files live under:
1919+2020+```text
2121+.tangled/workflows/
2222+```
2323+2424+They are YAML files. Official docs describe triggers such as:
2525+2626+- `push` — run when a commit is pushed
2727+- `pull_request` — run when a pull request is made or updated
2828+- manual trigger support may exist depending on current docs
2929+3030+Workflow clone behavior can be customized with a `clone` field. Documented clone options include:
3131+3232+- `skip`: skip cloning when the workflow does not need repo contents
3333+- `depth`: fetch limited commit history; default examples mention shallow clone behavior
3434+- `submodules`: fetch Git submodules recursively when needed
3535+3636+When creating or editing workflows:
3737+3838+1. Check existing `.tangled/workflows/` files first.
3939+2. Keep YAML minimal and explicit.
4040+3. Match trigger names and fields to the current official docs.
4141+4. Do not invent GitHub Actions syntax unless Tangled docs state compatibility.
4242+4343+## Webhooks
4444+4545+Official docs: https://docs.tangled.org/webhooks
4646+4747+Tangled webhooks send HTTP POST notifications to configured URLs. The documented event type is currently `push`.
4848+4949+Setup fields:
5050+5151+- Payload URL
5252+- Optional secret for signature verification
5353+- Events, currently push
5454+- Active enabled/disabled state
5555+5656+Typical headers:
5757+5858+- `Content-Type: application/json`
5959+- `User-Agent: Tangled-Hook/...`
6060+- `X-Tangled-Event: push`
6161+- `X-Tangled-Hook-ID`
6262+- `X-Tangled-Delivery`
6363+- `X-Tangled-Signature-256: sha256=...` when a secret is configured
6464+6565+Webhook payload includes before/after SHAs, ref, pusher DID, and repository metadata such as clone URL, HTML URL, SSH URL, name, full name, owner DID, counts, and timestamps.
6666+6767+When implementing a receiver:
6868+6969+- Verify HMAC-SHA256 if a secret is configured.
7070+- Respond quickly with 2xx; do longer work asynchronously to avoid retries/timeouts.
7171+- Avoid logging secrets or full payloads if they contain sensitive metadata.