Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问许可证需确认审计异常

directusdirectus 搜索

Agent Skill

directus 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

665

周安装

28

GitHub Stars

37

下载量

233
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:directus(directus 搜索)
来源仓库:https://github.com/terminalskills/skills
仓库路径:skills/directus
安装命令:
npx skills add https://github.com/terminalskills/skills --skill directus
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/terminalskills/skills --skill directus

简介

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息,辅助代码变更管理。

  • 适合在需要围绕仓库状态或协作事项进行整理时使用,如跟踪进度或汇总讨论。
  • 可结合原始 README 核验具体用法,确保操作符合项目维护策略。
  • 安装前建议确认权限范围,避免触发不必要的文件读写或命令执行。
  • directus 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Directus

Overview

Directus is an open-source headless CMS and data platform that wraps any SQL database with auto-generated REST and GraphQL APIs, a visual admin dashboard, role-based access control, file storage, and automation flows. Unlike Strapi (which defines its own schema), Directus mirrors your existing database — add columns in the admin UI or directly in SQL, and the API updates instantly. Use it for content management, internal tools, data APIs, and backend-as-a-service.

Instructions

Step 1: Deployment

# Docker (quickest start)
docker run -d --name directus \
  -p 8055:8055 \
  -e SECRET="your-secret-key-min-32-chars" \
  -e ADMIN_EMAIL="admin@example.com" \
  -e ADMIN_PASSWORD="your-secure-password" \
  -e DB_CLIENT="sqlite3" \
  -e DB_FILENAME="/directus/database/data.db" \
  -v directus_data:/directus/database \
  -v directus_uploads:/directus/uploads \
  directus/directus:latest

# Production with PostgreSQL
docker run -d --name directus \
  -p 8055:8055 \
  -e SECRET="your-secret-key" \
  -e ADMIN_EMAIL="admin@example.com" \
  -e ADMIN_PASSWORD="your-secure-password" \
  -e DB_CLIENT="pg" \
  -e DB_HOST="postgres" \
  -e DB_PORT="5432" \
  -e DB_DATABASE="directus" \
  -e DB_USER="directus" \
  -e DB_PASSWORD="dbpassword" \
  directus/directus:latest

# Access admin: http://localhost:8055

Step 2: Data Modeling

Create collections (tables) and fields via the admin UI or REST API:

# Create a "posts" collection via API
curl -X POST http://localhost:8055/collections \
  -H 'Authorization: Bearer admin_token' \
  -H 'Content-Type: application/json' \
  -d '{
    "collection": "posts",
    "meta": { "icon": "article", "note": "Blog posts" },
    "fields": [
      { "field": "id", "type": "uuid", "meta": { "special": ["uuid"] }, "schema": { "is_primary_key": true } },
      { "field": "title", "type": "string", "meta": { "required": true } },
      { "field": "slug", "type": "string", "meta": { "interface": "input" } },
      { "field": "content", "type": "text", "meta": { "interface": "input-rich-text-html" } },
      { "field": "status", "type": "string", "meta": { "interface": "select-dropdown", "options": { "choices": [{"text":"Draft","value":"draft"},{"text":"Published","value":"published"}] } } },
      { "field": "published_at", "type": "timestamp" }
    ]
  }'

Step 3: Auto-Generated APIs

Once collections exist, Directus auto-generates full CRUD APIs:

# REST — List all published posts
curl 'http://localhost:8055/items/posts?filter[status][_eq]=published&sort=-published_at&limit=10' \
  -H 'Authorization: Bearer token'

# REST — Get single post with related author
curl 'http://localhost:8055/items/posts/POST_ID?fields=*,author.name,author.avatar' \
  -H 'Authorization: Bearer token'

# REST — Create post
curl -X POST http://localhost:8055/items/posts \
  -H 'Authorization: Bearer token' \
  -H 'Content-Type: application/json' \
  -d '{"title": "My Post", "content": "<p>Hello world</p>", "status": "draft"}'

# GraphQL — Same queries
curl -X POST http://localhost:8055/graphql \
  -H 'Authorization: Bearer token' \
  -H 'Content-Type: application/json' \
  -d '{"query": "{ posts(filter: {status: {_eq: \"published\"}}, sort: [\"-published_at\"], limit: 10) { id title content published_at author { name } } }"}'

Step 4: SDK Integration

// lib/directus.js — JavaScript SDK for frontend/backend integration
import { createDirectus, rest, readItems, createItem, authentication } from '@directus/sdk'

const client = createDirectus('http://localhost:8055')
  .with(authentication())
  .with(rest())

// Fetch published posts
const posts = await client.request(
  readItems('posts', {
    filter: { status: { _eq: 'published' } },
    sort: ['-published_at'],
    limit: 10,
    fields: ['id', 'title', 'slug', 'content', 'published_at', { author: ['name', 'avatar'] }],
  })
)

// Create a new post
const newPost = await client.request(
  createItem('posts', {
    title: 'New Post',
    content: '<p>Content here</p>',
    status: 'draft',
  })
)

Step 5: Roles and Permissions

# Create a read-only "viewer" role
curl -X POST http://localhost:8055/roles \
  -H 'Authorization: Bearer admin_token' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Viewer", "admin_access": false}'

# Set permissions: viewer can read published posts only
curl -X POST http://localhost:8055/permissions \
  -H 'Authorization: Bearer admin_token' \
  -H 'Content-Type: application/json' \
  -d '{
    "role": "VIEWER_ROLE_ID",
    "collection": "posts",
    "action": "read",
    "permissions": { "status": { "_eq": "published" } },
    "fields": ["id", "title", "content", "published_at"]
  }'

Step 6: Flows (Automation)

Directus Flows are visual automation pipelines triggered by events (like Zapier, but built-in).

# Create a flow: when a post is published, send a webhook
curl -X POST http://localhost:8055/flows \
  -H 'Authorization: Bearer admin_token' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Notify on Publish",
    "trigger": "event",
    "options": { "type": "action", "scope": ["items.update"], "collections": ["posts"] },
    "accountability": "all",
    "status": "active"
  }'

Examples

Example 1: Build a content API for a marketing website

User prompt: "I need a CMS backend for our marketing site — blog posts, team members, case studies, and FAQ. Non-technical editors should be able to manage content through a visual dashboard."

The agent will:

  1. Deploy Directus with Docker + PostgreSQL.
  2. Create collections for posts, team_members, case_studies, and faqs.
  3. Set up relational fields (posts → author, case studies → tags).
  4. Configure a public role with read-only access for the frontend.
  5. Connect the Next.js/Astro frontend using the Directus SDK.

Example 2: Build an internal tool for operations data

User prompt: "Our ops team tracks orders, suppliers, and inventory in spreadsheets. Build a proper backend with an admin panel where they can manage everything."

The agent will:

  1. Deploy Directus pointing at the existing PostgreSQL database.
  2. Directus auto-detects existing tables and generates APIs + admin UI.
  3. Create roles: admin (full access), manager (CRUD), viewer (read-only).
  4. Set up flows for notifications (new order → Slack alert).

Guidelines

  • Directus mirrors your database schema — it does not own it. You can add columns via Directus admin or directly in SQL, and both stay in sync. This makes it safe for existing databases.
  • Use Directus as a backend-as-a-service for content-heavy apps. For complex business logic (multi-step workflows, custom calculations), extend with custom endpoints or use a separate API layer.
  • Configure the PUBLIC role carefully — it defines what unauthenticated users can access. For a public blog, allow read access to published posts only.
  • File uploads go to local storage by default. In production, configure S3, Cloudflare R2, or Google Cloud Storage for scalability.
  • Directus supports PostgreSQL, MySQL, MariaDB, MS SQL, SQLite, CockroachDB, and OracleDB. PostgreSQL is recommended for production.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.93%
按下载量换算84

Claude

28.56%
按下载量换算67

Cursor

18.79%
按下载量换算44

Gemini CLI

9.07%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills