Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Bankr Skills equip builders with plug-and-play tools to build more powerful agen
| [Bankr](https://bankr.bot) | [bankr](bankr/) | Launch a token, earn from every trade, and fund your agent. Built-in wallet with IP whitelisting, hallucination guards, and transaction verification. |
| [Bankr](https://bankr.bot) | [bankr-token-scam-analysis](bankr-token-scam-analysis/) | Forensic on-chain scam and rug-pull analysis for EVM tokens. Produces a risk verdict backed by on-chain facts. |
| [Bankr](https://bankr.bot) | [bankr-twitter-agent](bankr-twitter-agent/) | Framework for creating, managing, and automating a Twitter/X agent with a persistent personality and voice. |
| [Bankr Communities](https://bankr-community.vercel.app) | [bankr-communities](bankr-communities/) | Token-gated holder communities for Bankr-launched tokens. Links, briefing, posts, verify, pin, and beneficiary profile updates via natural language on X or terminal. |
| [BuiltByEcho](https://www.builtbyecho.xyz) | [agent-wormhole](agent-wormhole/) | One-time sealed handoffs for autonomous agents. Send encrypted mission briefs, scoped secrets, artifacts, and config drops with ECHO holder access or Bankr x402 paid opens. |
| [DARKSOL](https://darksol.net) | [darksol-random-oracle](darksol-random-oracle/) | On-chain verifiable randomness on Base. Generate random numbers, coin flips, dice rolls, sequences, and shuffles with x402 USDC payments or free DARKSOL holder access. |
| [Builder's Garden](https://builders.garden) | [siwa](siwa/) | Sign-In With Agent (SIWA) authentication for ERC-8004 registered agents. Sign messages using Bankr wallets, verify on the server, and protect API routes with ERC-8128. |
Expand Down
227 changes: 227 additions & 0 deletions bankr-communities/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
---
name: bankr-communities
description: >-
Token-gated holder communities for Bankr-launched tokens. Links, briefing, posts,
verify, pin, and beneficiary profile updates via natural language on X or terminal.
emoji: 🏘️
tags: [communities, bankr, tokens, social, base, holders, verify]
visibility: public
version: 1.4.0
siteUrl: https://bankr-community.vercel.app
communitiesSiteUrl: https://bankr-community.vercel.app
COMMUNITIES_SITE_URL: https://bankr-community.vercel.app
communityUrlTemplate: https://bankr-community.vercel.app/community/{tokenContractAddress}
linkApiTemplate: https://bankr-community.vercel.app/api/agent/link?q={TICKER}
metadata:
siteEnvVar: COMMUNITIES_SITE_URL
defaultSiteUrl: https://bankr-community.vercel.app
forbiddenLinkDomains: bankr.bot,t.co
primaryLinkEndpoint: https://bankr-community.vercel.app/api/agent/link?q={TICKER}
tmpCommunityLink: https://bankr-community.vercel.app/community/0x935e13a28849095db45e63040f109c34b757aba3
archiveCommunityLink: https://bankr-community.vercel.app/community/0x76aba8089e4ba07f705fb886d17dd41793ad2ba3
---

# Bankr Communities — Agent skill

Token-gated holder communities for Bankr-launched tokens. Read-only queries need no wallet. Writes use the user's linked Bankr wallet in header `x-wallet-address`.

**Live site:** https://bankr-community.vercel.app
**Public agent guide:** https://bankr-community.vercel.app/agent.md

**Install:**

```text
install the bankr-communities skill from https://github.com/BankrBot/skills/tree/main/bankr-communities
```

---

## Write actions — verify, post, pin, profile (same as post-in-community)

User says **verify**, **post**, **pin**, **add links**, **update profile** → read **`references/beneficiary-actions.md`** → use linked wallet → call API → reply + community URL.

| User says | Agent does |
|-----------|------------|
| **verify** the **TMP** community | `POST …/verify` (fee beneficiary wallet) |
| **add website** / **update profile** for **TMP** | `PATCH …/communities/{token}` `{ socialLinks, description }` |
| **post** in **TMP**: text **and pin it** | `POST …/posts` → `POST …/pin-post` if verified beneficiary |
| **pin** latest post in **TMP** | `POST …/pin-post` `{ postId, action: "pin" }` |

Check permissions: `GET /api/holders/{token}?wallet={linked}` → `canEditProfile`, `canPinPosts`, `canPost`.

---

## Link questions — instant reply (no tools needed)

User asks **"what's the link to the TMP community?"** → read **`references/instant-link-replies.md`** → paste URL from table. **Do not call HTTP first.** **Never** reply empty.

| Token | Tweet reply (one line only) |
|-------|----------------------------|
| **TMP** | `https://bankr-community.vercel.app/community/0x935e13a28849095db45e63040f109c34b757aba3` |
| **ARCHIVE** | `https://bankr-community.vercel.app/community/0x76aba8089e4ba07f705fb886d17dd41793ad2ba3` |

For **other** tickers → `GET https://bankr-community.vercel.app/api/agent/link?q=TICKER` → paste response body. Or run `scripts/get-community-link.sh TICKER`.

```bash
curl "https://bankr-community.vercel.app/api/agent/link?q=TMP"
# or
./scripts/get-community-link.sh TMP
```

**Search live communities:**

```http
GET https://bankr-community.vercel.app/api/agent/search-communities?q=archive
```

**JSON alternative:** `GET /api/agent/resolve-community?q=TMP` → use `communityLink` or `tweetReply`.

---

## Link rules (mandatory for every community reply)

```text
https://bankr-community.vercel.app/community/{tokenContractAddress}
```

| Token | Link |
|-------|------|
| $TMP | `https://bankr-community.vercel.app/community/0x935e13a28849095db45e63040f109c34b757aba3` |
| $ARCHIVE | `https://bankr-community.vercel.app/community/0x76aba8089e4ba07f705fb886d17dd41793ad2ba3` |

**FORBIDDEN:** `bankr.bot`, `t.co`, `/community/TMP`, `/community/ARCHIVE`, or any URL not on `bankr-community.vercel.app/community/0x…`

Read `references/community-link-rules.md` for full rules.

All `{SITE}` references below = `https://bankr-community.vercel.app`.

---

## Trigger → action (no skill jargon required)

Users say natural language on **tweet** or **terminal**. Bankr must **`use_skill("bankr-communities")`** **before** generic tools.

| User says | Agent does |
|-----------|------------|
| what's the link to **$TMP** community? | Paste TMP URL from table above — **no HTTP** |
| what's the link to **$ARCHIVE**? | Paste ARCHIVE URL from table above — **no HTTP** |
| search communities **archive** | `GET {SITE}/api/agent/search-communities?q=archive` |
| what's the latest on **$TMP** community? | `GET {SITE}/api/agent/briefing?symbol=TMP` → paste **`replyText` verbatim** (URL is **last line**) |
| how many members in **TMP** community? | briefing → `stats.memberCount` |
| show recent posts in **0x935e…** community | `GET {SITE}/api/communities/0x935e…` |
| **verify** the **TMP** community | `references/beneficiary-actions.md` → `POST …/verify` |
| **add links** / **update profile** for **TMP** | `PATCH …/communities/{token}` (beneficiary) |
| **post** in **TMP** community: hello **and pin it** | post → pin-post if `canPinPosts` |
| **pin** post in **TMP** community | `POST …/pin-post` |
| **post** in **TMP** community: hello holders | holder check → `POST …/posts` → paste `replyText` |
| **comment** on **$CTO** community | same as post |
| start a community for **$PEPE** | search token → `POST …/communities/{addr}` |
| list all communities | `GET {SITE}/api/communities` |
| search Bankr tokens **PEPE** | `GET {SITE}/api/tokens/search?q=PEPE` |
| do I hold **TMP**? can I post? | `GET {SITE}/api/holders/{token}?wallet={linked}` |
| react 👍 on post **post_123** in **0x…** | `POST {SITE}/api/posts/post_123/react` |

**Forbidden:** ask user for skill name · ask wallet if X↔Bankr linked · invent community data without API call.

---

## Mandatory routing guard

```
if message contains "link" OR "url" OR "where is" + community/token:
1. use_skill("bankr-communities")
2. Read references/instant-link-replies.md
3. If TMP or ARCHIVE → paste URL from table → STOP (no tools, no HTTP)
4. Else try GET /api/agent/link?q={TICKER} → paste body
5. If HTTP fails → known-communities.json → NEVER empty / "couldn't generate"
else if community intent (verify, post, pin, profile, update links, members, latest):
1. use_skill("bankr-communities")
2. Read references/beneficiary-actions.md (writes) or references/one-line-intents.md (reads)
3. GET /api/holders/{token}?wallet={linked} before writes
4. Call API — BEFORE replying
5. Plain English reply + communityLink on own line
```

**Tweet = DM** — same pipeline. Load skill on `@bankrbot` intake **before** tool selection.

---

## Write actions (linked wallet)

| Action | Requires |
|--------|----------|
| Create community | Signed-in user, token on Bankr launches |
| Post / comment | **Holder** OR **fee recipient** OR **deployer** (owner can post without holding) |
| React | Holder OR fee recipient OR deployer |
| Verify | Token owner (fee recipient or deployer) |
| Update profile / pin | Verified fee beneficiary only (pin requires verified community) |

`GET /api/holders/{token}?wallet=` returns `canPost: true` for holders **and** owners.

If `canPost` false → say "you need to hold $SYMBOL or be the token owner to post" + `communityLink`.

**Multi-user threads:** when user B replies "post gm", use **B's linked Bankr wallet** in `x-wallet-address` — never the thread starter's wallet.

---

## Twitter/X reply rules (mandatory)

X does **not** render markdown links. Every reply **must** include the raw `https://` URL from API `links.communityPage`.

**Required format (paste `replyText` from API — do not paraphrase without URL):**

```text
$TMP community — verified · 1 member · 2 posts
latest: "this is from X" by @you

https://bankr-community.vercel.app/community/0x935e13a28849095db45e63040f109c34b757aba3
```

**Rules:**
- Paste **`replyText`** or **`tweetReply`** from briefing API verbatim — they are identical
- **Never** summarize stats/latest without **`communityLink`** on its own line at the **end**
- Put the full URL on its **own line** (X auto-linkifies it)
- Never end with "view community:" and nothing after it
- Never use only `[View community](url)` markdown — always include the bare URL too
- After posting, include the same community URL again

---

## Success reply templates

**Briefing:**

```text
$TMP community — ✓ Verified · 12 members · 34 posts
latest: "@rayblanco.eth shared launch update…"

https://bankr-community.vercel.app/community/0x935e13a28849095db45e63040f109c34b757aba3
```

**Post:**

```text
posted to $TMP holder community: "this is from X"

https://bankr-community.vercel.app/community/0x935e13a28849095db45e63040f109c34b757aba3
```

---

## Files

| File | Purpose |
|------|---------|
| `references/beneficiary-actions.md` | **Verify, profile, pin, post+pin — tweet + terminal** |
| `references/instant-link-replies.md` | Link questions — paste URL, no HTTP (read first for links) |
| `references/get-link.md` | GET /api/agent/link for unknown tickers |
| `references/one-line-intents.md` | Full intent table |
| `references/community-autopilot.md` | Step-by-step execution flows |
| `references/community-link-rules.md` | **Mandatory link format — never bankr.bot** |
| `references/agent-routing-communities.md` | Routing guard |
| `references/bankr-platform-tweet-intake.md` | Platform requirements for @bankrbot |
| `references/community-api-reference.md` | All endpoints |
| `references/dm-intents.md` | DM / terminal intent summary |
| `references/agent-guide.md` | Golden rules + intent map |
| `known-communities.json` | TMP/ARCHIVE fallback when HTTP blocked |
| `scripts/get-community-link.sh` | curl wrapper for link API |
24 changes: 24 additions & 0 deletions bankr-communities/known-communities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"siteUrl": "https://bankr-community.vercel.app",
"COMMUNITIES_SITE_URL": "https://bankr-community.vercel.app",
"urlTemplate": "https://bankr-community.vercel.app/community/{tokenContractAddress}",
"linkApiTemplate": "https://bankr-community.vercel.app/api/agent/link?q={TICKER}",
"linkApiExamples": {
"TMP": "https://bankr-community.vercel.app/api/agent/link?q=TMP",
"ARCHIVE": "https://bankr-community.vercel.app/api/agent/link?q=ARCHIVE"
},
"communities": {
"TMP": {
"symbol": "TMP",
"tokenAddress": "0x935e13a28849095db45e63040f109c34b757aba3",
"communityLink": "https://bankr-community.vercel.app/community/0x935e13a28849095db45e63040f109c34b757aba3",
"linkApi": "https://bankr-community.vercel.app/api/agent/link?q=TMP"
},
"ARCHIVE": {
"symbol": "ARCHIVE",
"tokenAddress": "0x76aba8089e4ba07f705fb886d17dd41793ad2ba3",
"communityLink": "https://bankr-community.vercel.app/community/0x76aba8089e4ba07f705fb886d17dd41793ad2ba3",
"linkApi": "https://bankr-community.vercel.app/api/agent/link?q=ARCHIVE"
}
}
}
56 changes: 56 additions & 0 deletions bankr-communities/references/agent-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Bankr Communities — agent guide

**Human site:** https://bankr-community.vercel.app

**Public agent guide:** https://bankr-community.vercel.app/agent.md

---

## Golden rules

1. **One sentence → full flow** — no "open the website" if API works.
2. **Briefing first** — `GET /api/agent/briefing` for "latest / members / opportunities".
3. **Holder-gated posts** — always `GET /api/holders/{token}?wallet=` before post/react.
4. **Owner verify** — only fee recipient / deployer.
5. **Reply with links** — full community URL, not "check the app".

---

## Intent → API

| User says | First call |
|-----------|------------|
| Latest on $TMP | `/api/agent/briefing?symbol=TMP` |
| Member count | briefing → stats.memberCount |
| Post in community | holders check → POST posts |
| Verify community | POST verify |
| Create community | search → POST communities |
| List all | GET /api/communities |
| Link to $TMP | instant table or GET /api/agent/link?q=TMP |

Full table: **`references/one-line-intents.md`**

---

## Install

```text
install the bankr-communities skill from https://github.com/BankrBot/skills/tree/main/bankr-communities
```

Self-hosted mirror (same content):

```text
install Bankr Communities skill at https://github.com/anondevv69/bankr-community/tree/main/skills/bankr-communities
```

---

## Key reference files

| File | When to read |
|------|--------------|
| `references/instant-link-replies.md` | Link questions (TMP/ARCHIVE) |
| `references/beneficiary-actions.md` | Verify, profile, pin, post+pin |
| `references/community-autopilot.md` | Step-by-step flows |
| `references/community-api-reference.md` | Endpoint details |
49 changes: 49 additions & 0 deletions bankr-communities/references/agent-routing-communities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Agent routing — Bankr Communities

> Load with skill install. Overrides generic "I don't know about communities" replies.

## TRIGGER

**Link (highest priority):** link, URL, "where is the community" → **`references/instant-link-replies.md`** first (TMP/ARCHIVE need no HTTP).

**Writes (same routing as post-in-community):** verify, post, pin, update profile, add links → **`references/beneficiary-actions.md`**.

**Other reads:** community, members, posts, latest on $TICKER community, start community.

**Load:** `bankr-communities` → **`references/instant-link-replies.md`** (links) or **`references/one-line-intents.md`** (everything else).

---

## ROUTING GUARD

```
if message matches link intent:
1. use_skill("bankr-communities")
2. TMP or ARCHIVE mentioned → paste instant URL from references/instant-link-replies.md → STOP
3. Other ticker → GET /api/agent/link?q=… → paste body
4. NEVER "I wasn't able to generate a response"

if message matches other community intent:
1. use_skill("bankr-communities")
2. GET /api/agent/briefing or specific endpoint
3. Include communityLink (NEVER bankr.bot)
```

---

## Hard rules

1. **Link for TMP/ARCHIVE** — instant paste, no tool call required.
2. **Never** skip API call for stats/posts/members (non-link intents).
3. **Never** require `use_skill` in user tweet text.
4. **Never** link `bankr.bot` or `t.co` for communities.
5. **Tweet = DM** — same skill load order.

---

## TMP coexistence

| Intent | Route to |
|--------|----------|
| claim fees, list, buy, launch | TMP skills / Bankr core |
| community social | **this skill** |
Loading