create-grant
Create Grant
Add a grant (funding record) to an existing project. This creates two on-chain attestations: Grant + GrantDetails.
See Agent API Reference for auth, base URL, and error handling.
Prerequisite
If KARMA_API_KEY is not set in the environment, invoke the /setup-agent skill first, then continue with this skill.
Required Information
| Field | Required | Description |
|---|---|---|
chainId |
Yes | Chain where the project lives |
projectUID |
Yes | The project's attestation UID |
communityUID |
Yes | The community/program UID (bytes32) that funded the project |
title |
Yes | Grant title (1-200 chars) |
description |
No | Grant description (max 5000 chars) |
amount |
No | Funding amount as string (e.g., "50000") |
proposalURL |
No | Link to the grant proposal |
programId |
No | Program identifier (see below) |
Finding the programId
If the user provides a program/track name but not a programId, look it up:
# Accepts community slug (e.g., "optimism") or UID (0x...)
curl -s "${BASE_URL}/communities/${COMMUNITY_SLUG_OR_UID}/programs" | python3 -c "
import sys, json
data = json.load(sys.stdin)
programs = data if isinstance(data, list) else data.get('payload', data.get('data', []))
for p in programs:
print(f'Name: {p.get(\"metadata\", {}).get(\"title\", \"N/A\")} | ID: {p[\"programId\"]}')
"
Use the matching programId value in the request params.
Finding UIDs
Project UID — search by name:
curl -s "${BASE_URL}/v2/projects?q=PROJECT_NAME&limit=5&page=1" | python3 -c "
import sys, json
data = json.load(sys.stdin)
for p in data.get('payload', []):
d = p.get('details', {})
print(f'Title: {d.get(\"title\", \"N/A\")} | Chain: {p[\"chainID\"]} | UID: {p[\"uid\"]}')
"
Community UID — browse communities or get by slug:
curl -s "${BASE_URL}/v2/communities/?limit=10&page=1" | python3 -c "
import sys, json
data = json.load(sys.stdin)
for c in data if isinstance(data, list) else data.get('payload', data.get('data', [])):
d = c.get('details', {})
name = d.get('name', 'N/A') if isinstance(d, dict) else 'N/A'
print(f'Name: {name} | Chain: {c.get(\"chainID\", \"?\")} | UID: {c[\"uid\"]}')
"
Natural Language Mapping
| User says | Action |
|---|---|
| "add a grant from the Offchain Super Chain program to project X" | Look up project UID, community UID, and programId from programs list |
| "add a grant to project X" | Look up project UID, ask for community and grant details |
| "project X received $50K from Optimism" | Look up project + community UIDs, ask if it's a specific program or generic grant |
| "add funding from program Y to project X" | Look up community UID + programId for program Y, then create grant |
| "create a grant for 0xabc... from 0xdef..." | Use UIDs directly |
Important: When the user mentions a specific program name, always look up the
programIdvia the programs API and include it. WithoutprogramId, the grant won't appear under that program on the website.
Making the Request
BASE_URL="${KARMA_API_URL:-https://gapapi.karmahq.xyz}"
curl -s -X POST "${BASE_URL}/v2/agent/execute" \
-H "Content-Type: application/json" \
-H "x-api-key: ${KARMA_API_KEY}" \
-d '{
"action": "createGrant",
"params": {
"chainId": 10,
"projectUID": "0xproject...",
"communityUID": "0xcommunity...",
"title": "Optimism Builder Grant",
"description": "Funding for protocol development",
"amount": "50000",
"proposalURL": "https://gov.optimism.io/proposal/123"
}
}'
After Success
Display the result using the standard output format. The grant will be automatically indexed by the system.
Edge Cases
| Scenario | Response |
|---|---|
| Project or community name given instead of UID | Look up UIDs via the APIs |
| Community not found | "Could not find that community/program. Provide the community UID directly." |
| Amount with currency symbol | Strip the symbol and convert (e.g., "$50K" → "50000") |
| Missing community UID | This is required — ask the user which program/community funded the project |
More from show-karma/skills
find-funding-opportunities
Search the Karma Funding Map for funding programs (grants, hackathons, bounties, accelerators, VC funds, RFPs) via the public API. Use when user says "find grants", "search hackathons", "look for bounties", "explore funding", "programs on Optimism", "what can I apply to", "funding opportunities", or asks about programs over or under a budget.
30setup-agent
Set up or log in to Karma. Use when user says "set up agent", "configure API key", "connect to Karma", "login to Karma", "log in", or before first use of any Karma skill.
25skill-creator
Create new Claude Code skills for the Karma ecosystem. Use when user says "create a skill", "build a new skill", "scaffold a skill", or "design a skill". Guides through intent capture, SKILL.md writing, validation, and packaging.
23project-manager
Manage projects, grants, milestones, and updates on the Karma protocol. Use when user says "create a project", "new project", "add a grant", "record funding", "add milestone", "complete milestone", "post an update", "project progress", "grant update", "update project", "edit project", "edit grant", "complete grant", "add roadmap milestone", "report impact", "endorse project", "add team member", "set up agent", "configure API key", "check payouts", "payout status", "payout history", "total disbursed", "view invoices", "download invoice", or any project management action.
19find-opportunities
Search the Karma Funding Map for funding programs (grants, hackathons, bounties, accelerators, VC funds, RFPs) via the public API. Use when user says "find grants", "search hackathons", "look for bounties", "explore funding", "programs on Optimism", "what can I apply to", "funding opportunities", or asks about programs over or under a budget.
8funding-program-manager
Create and manage funding programs on Karma — create programs in the registry, configure intake forms, apply to programs, manage reviewers, applications, milestones, payouts, grant agreements, and AI evaluation. Use when user says "create a program", "new funding program", "set up grants program", "configure intake form", "add form fields", "apply to program", "submit application", "apply for grant", "manage program", "list reviewers", "add reviewer", "remove reviewer", "review applications", "approve application", "reject application", "application status", "list applications", "milestone completions", "pending milestones", "create payout", "disbursement", "payout history", "grant agreement", "sign agreement", "evaluate application", "AI score", "application comment", "enable applications", "update program", or any funding program administration action.
7