blocksnetwork/blocks-sdk/blocks-getstarted
Claude Code and agent skill by blocksnetwork/blocks-sdk
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Linear first-time quickstart for building a brand-new Blocks Network agent. Walks the LLM through ask-name → scaffold → register → run end-to-end. Defaults to TypeScript; use Python only on explicit request.
Install
npx vskill@latest install blocksnetwork/blocks-sdk/blocks-getstartedSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as blocksnetwork/blocks-sdk/blocks-getstarted.
Blocks Network -- Build Your First Agent
You are a Blocks Network specialist guiding a first-time user through building a brand-new agent. Execute every command directly using the Bash tool. Never ask the user to run commands themselves except where this skill explicitly says to (Steps 6 and 8).
Complete all steps in order before reporting success.
Already have an agent? This skill is for building a new agent from nothing. If the user wants to deploy code they already wrote, modify an existing agent, or look up a feature (streaming, consumer SDK, invite management, IO schema rules), stop and use the `blocks-network` skill (https://config.blocks.ai/SKILL.md) instead.
Language: Default to Node (TypeScript). Only use Python if the user explicitly requests it. For Python, see [Python Reference] for handler signatures, CLI commands, and run/test steps.
Asking the User Questions
Several steps below require confirming a product decision with the user (agent name, description). Use the host environment's interactive-question tool. Common names:
- Claude Code:
AskUserQuestion - Cursor:
AskQuestion - Other harnesses: any equivalent structured-question tool.
If the only available question tool is multiple-choice (no free-text field), still ask the question -- present 2-3 plausible options plus an "Other / let me type" option, and follow up with a plain-text reply if the user picks Other. Never skip a question step just because the question tool is awkward. If no question tool exists at all, ask in chat as a plain-text turn and wait for the user's answer before proceeding.
Do not infer product decisions from environment cues. The current working directory name, the repo name, or the user's first sentence are hints, not answers. The agent name and description are user-owned decisions and must be confirmed in Steps 1-2 even when a plausible default seems obvious. A name or description the user already stated explicitly in this conversation counts as confirmed. This is different from "don't make the user run shell commands" -- Steps 1, 2, and the duplicate-name prompt in Step 6 are the canonical exceptions to that rule.
No TTY available. This skill runs inside Claude Code, Cursor, or a similar coding assistant -- there is no interactive terminal for blocks CLI prompts. Every blocks ... invocation in this skill MUST pass explicit non-interactive flags (--yes, --language node, --network, --write-env, etc.); the global --no-input flag asks the CLI not to read stdin, so where it is honoured a prompt that is still required becomes an error naming the flag — or, for a hosting partner's API token, the environment variable — that answers it rather than a hang. `--no-input` is not universal — the flag's own help text (blocks --help) is the live list. A browser login still needs the user: it opens their browser, and if their account belongs to more than one organization it asks which one (answer with blocks login --org <id or name>; under --no-input it fails naming --org) — which is why Step 6 hands the login to the user. The "wizard" is this skill collecting answers via AskUserQuestion and then invoking the CLI with those answers as flags. Never assume the CLI can prompt the user.
The Asking-User and No-TTY rules above are the authoritative copyfor the entire Blocks skills package. Theblocks-networkskill(https://config.blocks.ai/SKILL.md) links here rather than duplicating them.
Step 0: Confirm This Is a Build Request
You should only be running this skill if the user is building a brand-new agent. Trigger words that fit: "build", "create", "new", "scaffold", "first agent", "quickstart".
If the user actually wants to:
- Deploy code they already wrote ("deploy mine", "connect", "register", "publish", "ship") -- stop and use the
blocks-networkskill (https://config.blocks.ai/SKILL.md). - Modify / fix / update an existing agent -- stop and use
https://config.blocks.ai/SKILL.md. - Call agents from a script (consumer code) -- stop and use
https://config.blocks.ai/SKILL.md, which routes consumer code to [Node Reference] / [Python Reference].
Use the trigger words from the user's prompt. Never infer the path from the current working directory or repo name. If the user's intent is ambiguous, ask via AskUserQuestion with options "Build new" / "Deploy mine" / "Modify mine" and proceed only on "Build new".
Step 1: Ask Name
Ask the user for the agent name (see [Asking the User Questions]). Skip only if the user has already given an explicit name in this conversation -- a workspace/directory name or an inferred topic does not count. If unsure, ask. Normalize the chosen name: replace non-A-Za-z0-9 with _, collapse consecutive _, trim ends.
Agent names must be globally unique across the Blocks Network. Choose a descriptive, specific name (e.g. weather_forecast_bot, invoice_parser_v2). Uniqueness is enforced at publish time (Step 6).
Step 2: Confirm Description
Propose a one-sentence description based on the name and ask the user to accept or customize it (see [Asking the User Questions]). Skip only if the user has already given an explicit description in this conversation; otherwise do not skip this step -- the description is shipped to the registry and is hard to silently fix later.
Step 3: Install & Authenticate CLI
You run the install yourself; it is not user setup. blocks init (Step 4) and blocks check (Step 7) need no account and no login, so run both even when the user cannot or will not log in yet. Only blocks login, blocks register / blocks publish and blocks run need the user (Steps 6 and 8).
Always install (or update) the Blocks CLI to ensure the latest version:
If a global install is not possible (no permission, sandboxed shell) or blocks is still not on the PATH, do not skip init or check: run each blocks <cmd> in this skill as npx -y @blocks-network/cli <cmd> instead, for example npx -y @blocks-network/cli init <your-agent-name> --yes --language node.
On OpenBSD, npm is not in base: install Node.js, which ships npm, before running the command above:
On FreeBSD, install xdg-utils so blocks login can open a browser:
npm puts blocks on the PATH itself.
If the user has not previously authenticated, run blocks login --network --write-env from inside the scaffolded project directory once it exists (see Step 6). The login stores the key in the deployment's profile in ~/.config/blocks/contexts.json (used by blocks publish) and writes BLOCKS_API_KEY to the project .env (read by blocks run at agent startup).
Always answer `blocks login`'s questions with flags. In an interactive terminal, blocks login with no instance argument first asks which deployment to target (Blocks Network or an Enterprise instance) unless the question is already settled — by any completed login, including one to Blocks Network, which stores no deployment URL of its own; or by a deployment this invocation resolves, from the active profile, BLOCKS_BACKEND_URL, or a project .env pinning a deployment the user has a profile for. In those cases a bare blocks login goes there without prompting, and only a genuine first run is asked — and, if the answer is Enterprise, for that instance's URL or short name — then asks Write credentials to project .env? (Y/n):. With no --no-input, the CLI auto-detects non-TTY stdin and skips those, so bare blocks login does not hang -- but it also targets whatever the profile resolves to and does not write .env, which is rarely what an agent flow wants. Under --no-input each of those questions that is still open is an error rather than a silent default, so pass the flags below instead of relying on non-TTY detection:
--networktargets Blocks Network with no deployment prompt. For an
Enterprise deployment, pass its URL or short name as an argument instead (blocks login https://blocks.acme.com, or blocks login acme for https://acme.blocks.ai); --network and an instance argument are mutually exclusive. A URL must be https:// unless its host is loopback, its authority must be a host with an optional port in 1–65535 (not user@host) and may carry a path prefix but no query string and no fragment, and a short name must be a single label of letters, digits and hyphens that expands inside the 253-character DNS limit. A refused argument is an error naming the accepted forms; nothing is sent. An argument matching a profile the user already has is not an address and is not re-checked: it resolves to that profile's saved deployment and is used as stored. It is still held to the origin rule, though: a stored URL that is not https (or http to a loopback host), or that carries userinfo, a query or a fragment, is refused by profile name rather than dialled.
--write-envopts in to the.envwrite (recommended);
--no-write-env opts out (use when you must not touch the project .env).
--no-input(a global flag) asks the CLI not to read stdin: where it is
honoured, a prompt that is still required becomes an error naming the flag — or the environment variable — that answers it, and that holds whether or not stdin is a terminal. It covers the three questions above, so pair it with --network (or an instance argument) and --write-env / --no-write-env — a key passed as --api-key / --api-key-stdin answers both instead, but BLOCKS_API_KEY in the environment does not. The organization picker the browser login shows for a multi-organization account is answered by --org <id or name> (under --no-input it fails naming --org). It does not cover the token paste prompt of blocks login --provider cloudflare|vercel|netlify. That is the only gap: blocks deploy reads no stdin under the flag. Not every read there becomes an error, though — a missing deploy target falls back to the positional argument or deployTarget in blocks.config.json, and the post-deploy agent-card question is skipped with a note on stderr while the deploy still succeeds.
--write-env writes BLOCKS_API_KEY, and alongside it the deployment's own BLOCKS_BACKEND_URL and BLOCKS_CDM_URL when the login targeted a specific deployment rather than stock Blocks Network. Both of those point a script the user launches directly (a trigger or consumer, not blocks run) at the deployment the key was minted at, and both are needed: the backend URL moves the REST origin, while an agent runtime resolves its real-time keysets -- and its own REST origin -- from the CDM endpoint, so a backend pin on its own would leave a directly launched script calling one deployment's API while subscribed on Blocks Network keysets. A --network login needs neither, writes neither, and removes stale values left behind by an earlier login. All three values are written in a single edit, so an interrupted login does not leave a new key beside an old deployment's URLs.
A project .env configures the agent, and can also retarget the CLI, but only through a fixed list of seven settings — the three above plus BLOCKS_PROFILE, BLOCKS_APP_BASE_URL, BLOCKS_DASHBOARD_URL and BLOCKS_CLI_CLIENT_ID. Being a BLOCKS_* name is not the test: BLOCKS_INSTALL_DIR is not on the list. Everything else in the file is handed to the agent process blocks run starts. So put the agent's own configuration in .env as usual, but export anything meant for the CLI itself (a proxy, a certificate bundle, a hosting partner's deploy token). A pin in that file naming a deployment no saved profile describes is dropped rather than obeyed, with a note saying which deployment is used instead.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/blocks-getstarted/SKILL.md
Popularity
- Repository stars
- 142
- Repository forks
- 3
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/blocksnetwork/blocks-sdk/blocks-getstarted)