fastapi-chameleon
Skill by mikeckennedy
Adds Chameleon template rendering to FastAPI through the fastapi_chameleon package. Use it when writing Python code that renders Chameleon (TAL) templates from FastAPI views.
Install fastapi-chameleon
Built from the published package, never by AI.
git clone --depth 1 https://github.com/mikeckennedy/fastapi-chameleon /tmp/fastapi-chameleon && mkdir -p ~/.claude/skills && cp -r /tmp/fastapi-chameleon/docs ~/.claude/skills/fastapi-chameleonRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/mikeckennedy/fastapi-chameleon /tmp/fastapi-chameleon && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/fastapi-chameleon/docs ~/.gemini/antigravity-cli/skills/fastapi-chameleonAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The fastapi-chameleon skill gives an AI assistant guidance for the fastapi_chameleon package, which adds Chameleon template rendering to FastAPI. It covers setup with global_init, the template decorator that renders a view's return value, and response() for custom status codes and mimetypes. It also explains friendly HTML error pages through not_found() and generic_error(), and how returning a fastapi.Response skips the template.
The skill also describes Chameleon's TAL syntax, which uses tal:, metal: and i18n: attributes and ${...} interpolation rather than Jinja or Django syntax. It includes an end-to-end example, METAL macros for shared layouts, and template path resolution rules. It is aimed at developers writing Python code that uses the fastapi_chameleon package in FastAPI projects.
Written from the project's SKILL.md and checked against it.
What it can do
- templateDecorate a FastAPI view to render its return value through a Chameleon template.
- responseRender a template and return it as a FastAPI response directly.
- not_foundShort-circuit the current view and render a friendly 404 page.
- generic_errorShort-circuit the current view and render an error page with a custom status code.
- engine.renderGet rendered HTML as a plain string.
- global_initInitialize the Chameleon template engine for the app.
What you need
- Python 3.10 or newer
Try asking
- Render my FastAPI view with a Chameleon template using fastapi_chameleon
- Return a friendly HTML 404 page from my FastAPI item lookup
- Set up global_init for my Chameleon templates folder in FastAPI
Good to know
- global_init() is one-shot by default and later calls are ignored unless cache_init=False or engine.clear() is used.
- not_found() and generic_error() only work below a @template-decorated view.
- Chameleon uses TAL syntax, not Jinja or Django syntax.
- Decorated views must return a dict or a fastapi.Response.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: docs/skill.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to fastapi-chameleon
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
fastapi-chameleon: common questions
Does the template decorator work with async FastAPI views?
Yes. The source says the decorator works on sync or async view functions and keeps FastAPI dependency injection working.
Why does a 404 error not show an HTML page?
not_found() and generic_error() only work below a decorated view. From an undecorated route or middleware, the exception is unhandled and FastAPI returns a 500.
What is the difference between template and response()?
The template decorator renders the dict a view returns. response() builds a rendered Response with a custom status code or mimetype.
How do I install fastapi-chameleon?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is fastapi-chameleon free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is fastapi-chameleon safe to use?
It scores 79 of 100. Grades: maintenance A, licence A, quality B. 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 fastapi-chameleon?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
