create-portable-text-component
Skill by jamesreaco
Creates a new custom object type that editors can insert inline into rich text on a Sanity and Next.js site. It is for developers who add embeds such as call to action or video blocks to Portable Text content.
Install create-portable-text-component
Built from the published package, never by AI.
git clone --depth 1 https://github.com/jamesreaco/site-engine /tmp/site-engine && mkdir -p ~/.claude/skills && cp -r /tmp/site-engine/.claude/skills/create-portable-text-component ~/.claude/skills/create-portable-text-componentRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install create-portable-text-component in Claude Code
git clone --depth 1 https://github.com/jamesreaco/site-engine /tmp/site-engine && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/site-engine/.claude/skills/create-portable-text-component ~/.gemini/antigravity-cli/skills/create-portable-text-componentAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install create-portable-text-component in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill scaffolds a new inline object type for Portable Text rich text fields in a Sanity and Next.js site. It follows the pattern used by the existing Call To Action, Single Image and Video embeds. It asks the user for a component name and its fields, then derives consistent names for the schema and React component.
The skill touches five files. It creates a schema object, registers it in the schema index, adds it to the rich text field arrays, creates a basic React component, and registers that component in the Portable Text components map. It then regenerates Sanity types and runs TypeScript and lint checks. It is aimed at developers working on this specific project structure, and it is not for top-level page builder blocks.
Written from the project's SKILL.md and checked against it.
What it can do
- Gather requirementsAsks the user for the component name and the fields it should have before scaffolding.
- Derive consistent namesSets camelCase Object schema names, kebab-case schema filenames and PascalCase component names.
- Create schema objectWrites an inline Sanity object schema with a lucide-react preview icon and minimal fields.
- Register schemaImports the new schema and adds it to the objectSchema array in the schema index.
- Allow in rich text fieldsAdds the new object type to the Portable Text content arrays where editors should be able to insert it.
- Create React componentGenerates a basic component that renders each field plainly inside a dashed border, marked as a scaffold.
- Register componentAdds the new object type to the types map in PortableTextComponents.
- Regenerate Sanity typesRuns npx sanity schema extract and npx sanity typegen generate to keep generated types in sync.
- VerifyRuns npx tsc --noEmit and npm run lint and asks the user to check the new option in Sanity Studio.
What you need
- A Sanity and Next.js project with the referenced files in place
- Node.js and npm to run npx commands
- Access to Sanity Studio to confirm the new inline option
Try asking
- Create a portable text component called Quote with quote text and attribution
- Add a new inline object type for rich text named Callout with a title and body
- Scaffold an inline Portable Text embed for a pull quote with an image field
Good to know
- The skill cannot visually verify Sanity Studio, so the user must check the rich text toolbar.
- The generated component is a deliberately basic scaffold that needs a real design.
- The typegen step is not wired into package.json scripts and must be run directly.
- It only applies to inline Portable Text objects, not page builder blocks.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/create-portable-text-component/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to create-portable-text-component
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
create-portable-text-component: common questions
What is the difference between this skill and create-page-builder-block?
This skill adds inline objects inside rich text content. The source says page builder blocks, which are top-level page sections, use create-page-builder-block instead.
Which files does this skill change?
The source says it touches five files: a new schema object, the schema index, the Portable Text content arrays, a new React component, and the PortableTextComponents types map.
Does the skill add fields I did not ask for?
No. The source says it does not guess field names or add extra fields beyond what the user asks for.
How do I install create-portable-text-component?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is create-portable-text-component free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is create-portable-text-component safe to use?
It scores 54 of 100. Grades: maintenance B, licence F, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to create-portable-text-component?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
