CLI and skills
Use the Knock CLI together with Knock skills to enable AI coding agents to manage your notification system from your codebase.
The Knock CLI and Knock skills are the IDE path for working with Knock alongside an AI coding agent. The CLI gives an agent the local tools it needs to read and write Knock resources from your codebase, and skills give the agent the instructions it needs to use those tools correctly.
Most teams install both together when working in Cursor, Claude Code, or Copilot.
Install the Knock CLI
#The Knock CLI is what your coding agent uses to manage Knock resources locally. With it, you and your agent can pull workflows, templates, email layouts, partials, and guides into your repo, edit them as code, and push changes back to Knock.
Install the CLI with npm:
Then authenticate with knock login. See the Knock CLI docs for full installation, authentication, and command reference.
Install Knock skills
#Skills are packaged instructions and rules that extend an AI coding agent's capabilities with Knock-specific knowledge. Once installed, a skill auto-activates when you ask the agent to work on a related task — no manual prompting required.
Knock publishes an open-source skills package on GitHub at github.com/knocklabs/skills.
Install the entire package with a single command:
Or install specific skills by passing a flag:
Available skills
#knock-cli
#The knock-cli skill teaches AI agents how to use the Knock CLI to manage your Knock resources. Use it when you want an agent to:
- Pull workflows, templates, guides, and partials to your local machine
- Push local changes back to Knock
- Manage Knock resources as part of a development or CI/CD workflow
notification-best-practices
#The notification-best-practices skill gives AI agents comprehensive guidelines for notification design and implementation. Use it when you want an agent to:
- Write notification copy across channels (email, SMS, push, in-app)
- Apply best practices for transactional and welcome email templates
- Follow channel-specific formatting and content guidelines
How they work together
#The CLI and skills are designed to be used in tandem:
- The CLI provides the tools. When an agent needs to create, edit, or sync a Knock resource from your codebase, it shells out to the
knockcommand. - Skills provide the instructions. The
knock-cliskill tells the agent which commands exist, when to reach for each one, and how to structure the resource files the CLI expects. - The agent ties them together. When you ask "add a comment-created workflow to this repo," the agent reads the skill, runs the right
knockcommands, and writes the resulting files into your project.
You can pair this setup with the MCP server when you also want the agent to perform live API operations against your Knock account.
See also
#- Knock AI overview — see how the CLI and skills fit alongside the dashboard agent, agent function, and MCP server.
- Knock CLI — full reference for the CLI.
- MCP server — connect external clients and your own apps to Knock as tools.