ash-json-api
AshJsonApi guidelines for exposing Ash resources as JSON:API compliant REST endpoints. Use when adding JSON:API extensions to domains/resources, configuring routes, or implementing filtering, sorting, pagination, and includes. Supports full JSON:API specification.
Best use case
ash-json-api is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
AshJsonApi guidelines for exposing Ash resources as JSON:API compliant REST endpoints. Use when adding JSON:API extensions to domains/resources, configuring routes, or implementing filtering, sorting, pagination, and includes. Supports full JSON:API specification.
Teams using ash-json-api should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ash-json-api/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ash-json-api Compares
| Feature / Agent | ash-json-api | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
AshJsonApi guidelines for exposing Ash resources as JSON:API compliant REST endpoints. Use when adding JSON:API extensions to domains/resources, configuring routes, or implementing filtering, sorting, pagination, and includes. Supports full JSON:API specification.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# AshJsonApi Guidelines
AshJsonApi generates JSON:API compliant endpoints from Ash resources, supporting filtering, sorting, pagination, includes, and relationships.
## Domain Configuration
Add the `AshJsonApi.Domain` extension and define routes:
```elixir
defmodule MyApp.Blog do
use Ash.Domain,
extensions: [AshJsonApi.Domain]
json_api do
authorize? true
routes do
base_route "/posts", MyApp.Blog.Post do
get :read
index :read
post :create
patch :update
delete :destroy
end
end
end
resources do
resource MyApp.Blog.Post
resource MyApp.Blog.Comment
end
end
```
## Resource Configuration
Add the `AshJsonApi.Resource` extension and specify the type:
```elixir
defmodule MyApp.Blog.Post do
use Ash.Resource,
domain: MyApp.Blog,
extensions: [AshJsonApi.Resource]
attributes do
uuid_primary_key :id
attribute :title, :string
attribute :body, :string
attribute :published, :boolean
end
relationships do
belongs_to :author, MyApp.Accounts.User
has_many :comments, MyApp.Blog.Comment
end
json_api do
type "post" # Required: JSON:API type name
end
actions do
defaults [:create, :read, :update, :destroy]
read :list_published do
filter expr(published == true)
end
update :publish do
accept []
change set_attribute(:published, true)
end
end
end
```
## Route Types
| Route | HTTP | Path | Description |
|-------|------|------|-------------|
| `get` | GET | `/posts/:id` | Fetch single resource |
| `index` | GET | `/posts` | List resources (filter/sort/paginate) |
| `post` | POST | `/posts` | Create resource |
| `patch` | PATCH | `/posts/:id` | Update resource |
| `delete` | DELETE | `/posts/:id` | Destroy resource |
| `related` | GET | `/posts/:id/comments` | Fetch related resources |
| `relationship` | GET | `/posts/:id/relationships/comments` | Fetch relationship data |
| `post_to_relationship` | POST | `/posts/:id/relationships/comments` | Add to relationship |
| `patch_relationship` | PATCH | `/posts/:id/relationships/comments` | Replace relationship |
| `delete_from_relationship` | DELETE | `/posts/:id/relationships/comments` | Remove from relationship |
## Query Parameters
Standard JSON:API query parameters:
```
# Filter
?filter[attribute]=value
# Sort (descending with -)
?sort=attribute,-other_attribute
# Pagination
?page[number]=2&page[size]=10
# Includes (sideload related resources)
?include=author,comments.author
```Related Skills
json-yaml
Process JSON, YAML, CSV, and XML data (jq, yq, awk).
json-visualization-dev
Develop and maintain the JSON Visualization web application - a Next.js tool for visualizing JSON/YAML/CSV/XML data as interactive graphs. Use when working with this codebase, adding features, fixing bugs, or understanding the graph visualization, data conversion, or type generation systems.
json-canvas
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
file-to-json-parsing
Use AgentPMT external API to run the File To JSON Parsing tool with wallet signatures, credits purchase, or credits earned from jobs.
aria2-json-rpc
Interact with aria2 download manager via JSON-RPC 2.0. Manage downloads, query status, and control tasks through natural language commands. Use when working with aria2, download management, or torrent operations.
adf-json-example
Fetch raw ADF JSON data from a Confluence page URL. Use this skill when you need to see real-world ADF examples, understand how Confluence represents specific elements, debug ADF parsing, or create test samples.
adf-format-json-schema
Query Atlassian Document Format (ADF) JSON schema definitions to understand ADF node and mark types. Use this skill when implementing ADF dataclass nodes/marks, or when user asks about ADF structure, ADF nodes, ADF marks, or Atlassian Document Format implementation.
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
moai-lang-r
R 4.4+ best practices with testthat 3.2, lintr 3.2, and data analysis patterns.
moai-lang-python
Python 3.13+ development specialist covering FastAPI, Django, async patterns, data science, testing with pytest, and modern Python features. Use when developing Python APIs, web applications, data pipelines, or writing tests.
moai-icons-vector
Vector icon libraries ecosystem guide covering 10+ major libraries with 200K+ icons, including React Icons (35K+), Lucide (1000+), Tabler Icons (5900+), Iconify (200K+), Heroicons, Phosphor, and Radix Icons with implementation patterns, decision trees, and best practices.
moai-foundation-trust
Complete TRUST 4 principles guide covering Test First, Readable, Unified, Secured. Validation methods, enterprise quality gates, metrics, and November 2025 standards. Enterprise v4.0 with 50+ software quality standards references.