diff --git a/.agents/skills/tang/SKILL.md b/.agents/skills/tang/SKILL.md deleted file mode 100644 index b8eb493..0000000 --- a/.agents/skills/tang/SKILL.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -name: tang -description: | - Use this skill when the user asks about this repo on Tangled, Tangled issues, - Tangled pull requests, or Tangled operations. The current git remote is a - Tangled repo, so `tang` can usually infer the repository from the worktree. ---- - -# tang — Tangled repo workflow - -This repo packages [`tang`](https://tangled.org/onev.cat/tang) in `devenv`. -Use it for Tangled operations. - -## Repository selection - -Prefer the current git worktree. `tang` discovers the repo from `.git` remotes, -so in this repo use commands without `--repo` / `-R` by default: - -```bash -tang status -tang repo view -tang issue list -tang pr list -``` - -Only add `-R /` when the user explicitly asks about a different -Tangled repo. - -## Auth - -Reads often work without auth. Writes require login: - -```bash -bash .agents/skills/tang/auth.sh -``` - -The bootstrap uses `ATPROTO_HANDLE` / `ATPROTO_APP_PASSWORD`, falling back to -`BSKY_HANDLE` / `BSKY_APP_PASSWORD`. App passwords are created at -. Never use the main account password. - -## Common commands for this repo - -```bash -# Inspect -tang status -tang repo view -tang issue list -tang issue view -tang pr list -tang pr view -tang pr diff - -# Issues -tang issue create "Title" --body "Body" -tang issue comment --body "Comment" -tang issue close -tang issue reopen - -# Pull requests -tang pr create --base main --head --title "Title" -tang pr comment --body "Comment" -tang pr checkout -tang pr merge --subject "Merge pull request #N" -``` - -## Identifiers - -Numeric issue and PR IDs match Tangled web URLs. For raw protocol records, use -`--atproto` with an AT URI, rkey, or unique rkey prefix. - -## Safety - -Ask before performing writes against a different repo than the current worktree, -or when auth is unavailable. diff --git a/.agents/skills/tang/auth.sh b/.agents/skills/tang/auth.sh deleted file mode 100755 index 97642e9..0000000 --- a/.agents/skills/tang/auth.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -# Bootstrap tang auth for agent use. -# -# Uses tang directly when available, otherwise runs it through devenv. -# Logs in only when tang reports unauthenticated. - -set -euo pipefail - -run_tang() { - if command -v tang >/dev/null 2>&1; then - tang "$@" - elif command -v devenv >/dev/null 2>&1; then - devenv shell -- tang "$@" - else - echo "tang is not on PATH and devenv is unavailable" >&2 - exit 127 - fi -} - -status="$(run_tang auth status --json 2>/dev/null || true)" -if printf '%s\n' "$status" | grep -q '"authenticated"[[:space:]]*:[[:space:]]*true'; then - printf '%s\n' "$status" - exit 0 -fi - -: "${ATPROTO_HANDLE:=${BSKY_HANDLE:-}}" -: "${ATPROTO_APP_PASSWORD:=${BSKY_APP_PASSWORD:-}}" - -if [ -z "${ATPROTO_HANDLE:-}" ] || [ -z "${ATPROTO_APP_PASSWORD:-}" ]; then - echo "Not authenticated." >&2 - echo "Set ATPROTO_HANDLE / ATPROTO_APP_PASSWORD or BSKY_HANDLE / BSKY_APP_PASSWORD." >&2 - echo "Create an app password at https://bsky.app/settings/app-passwords" >&2 - exit 1 -fi - -export ATPROTO_HANDLE ATPROTO_APP_PASSWORD -run_tang auth login --handle "$ATPROTO_HANDLE" <<< "$ATPROTO_APP_PASSWORD"