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

project-files项目文件

Agent Skill

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

总安装

539

周安装

22

GitHub Stars

3

下载量

174
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/compilet-dev/agent-skill-layerproof --skill project-files

简介

project-files 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

  • 适用于项目文件管理、协作事项跟踪和代码变更审查等开发类任务。
  • 可结合来源仓库和安装命令进一步核验具体用法和功能边界。
  • 安装前建议确认权限范围和维护状态,避免触发不必要的联网或命令执行。
  • 需注意是否会读写文件或访问私有仓库,确保 token 权限和用户授权合规。

SKILL.md

Skill: Project Files

Description

Manage files in project directories. This skill documents the public API at /api/v2/projects/{projectId} (PublicApiProjectFileController). Upload flow: 1) POST prepare with directoryId; 2) PUT file to upload_url; 3) POST confirm with file_id. All paths require projectId; prepare/prepare-update also need directoryId. Authenticate with X-API-KEY header.


TypeScript types (request / response)

Mirrors PublicApiProjectFileController data classes.

// --- Prepare upload (POST) — 201 ---
type PrepareFileUploadRequest = {
  path: string;
  file_name: string;
  mime_type: string;
  size: number;
};
type PrepareFileUploadResponse = {
  upload_url: string;
  file_id: string;
  s3_key: string;
  expires_at: string;
};

// --- Prepare update (POST) ---
type PrepareUpdateFileRequest = {
  path: string;
  mime_type?: string | null;
  size?: number | null;
};
type PrepareUpdateFileResponse = {
  upload_url: string;
  file_id: string;
  s3_key: string;
  expires_at: string;
};

// --- Confirm (POST) ---
type ConfirmFileUploadRequest = { metadata?: Record<string, unknown> | null };
type FileResponse = {
  id: string;
  name: string;
  file_type: string;
  mime_type: string;
  s3_key: string;
  size: number;
  uploaded_at: string;
  uploaded_by: string;
  status: string;
  metadata: Record<string, unknown> | null;
};

// --- Download URL (GET), Get file (GET), Delete (DELETE) ---
type DownloadUrlResponse = {
  download_url: string;
  expires_at: string;
};

// --- Preview URL (POST .../preview-url) ---
type PreviewUrlResponse = {
  preview_url: string;
  expires_at: string;
};

// --- Create subdirectory (POST .../subdirectories) ---
type CreateDirectoryRequest = { name: string };
type CreateDirectoryResponse = { id: string; name: string };

// --- Resolve assets (POST .../resolve-assets) ---
type ResolveAssetsRequest = { paths: string[] };
type ResolvedAsset = {
  original_path: string;
  presigned_url: string | null;
  error: string | null;
};
type ResolveAssetsResponse = { assets: ResolvedAsset[] };

// --- Resolve paths to IDs (POST .../resolve-paths-to-ids) ---
type ResolvePathsToIdsRequest = { paths: string[] };
type ResolvedPathToId = {
  original_path: string;
  file_id: string | null;
  error: string | null;
};
type ResolvePathsToIdsResponse = { resolved: ResolvedPathToId[] };

// --- AI file (POST .../ai-files) — 201 ---
type CreateAiFileRequest = {
  filename: string;
  path: string;
  workflow_type: string;
  project_type_id?: string | null;
  form_input_data?: Record<string, unknown> | null;
};
type CreateAiFileResponse = {
  file_id: string;
  filename: string;
  workflow_type: string;
};

// --- Trigger / cancel AI file ---
type TriggerAiFileRequest = { form_input_data?: Record<string, unknown> | null };
type TriggerAiFileResponse = {
  activity_id: string;
  workflow_type: string;
  live_object_id: string;
};
type CancelAiFileResponse = {
  live_object_id: string;
  cancelled_children: number;
};

Prepare Project File Upload

Request body: PrepareFileUploadRequest. Response (201): PrepareFileUploadResponse.

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/directories/<directory_id>/files/prepare" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY" \
  -d '{"path":"/","file_name":"doc.pdf","mime_type":"application/pdf","size":2048}'

Prepare Project File Update

Request body: PrepareUpdateFileRequest. Response: PrepareUpdateFileResponse.

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/directories/<directory_id>/files/prepare-update" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY" \
  -d '{"path":"/doc.pdf","mime_type":"application/pdf","size":2048}'

Confirm Project File Upload

Request body: ConfirmFileUploadRequest. Response: FileResponse.

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/files/<file_id>/confirm" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY" \
  -d '{"metadata":{}}'

Get File Download URL

Response: DownloadUrlResponse.

curl "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/files/<file_id>/download-url" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY"

Get File Details

Response: FileResponse.

curl "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/files/<file_id>" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY"

Delete Project File

Response: 204 No Content.

curl -X DELETE "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/files/<file_id>" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY"

Create Subdirectory

Creates a child directory under directory_id. Response (201): CreateDirectoryResponse.

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/directories/<directory_id>/subdirectories" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY" \
  -d '{"name":"assets"}'

Preview URL (HTML)

For HTML files: processes assets and returns a presigned preview URL.

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/directories/<directory_id>/files/<file_id>/preview-url" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY"

Resolve Asset Paths to URLs

Body: {"paths": ["./img.png", "..."]}. Response: ResolveAssetsResponse.

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/directories/<directory_id>/resolve-assets" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY" \
  -d '{"paths":["/relative/path.png"]}'

Resolve Paths to Live Object IDs

Body: {"paths": ["~/file.txt", "/abs/path"]}. Response: ResolvePathsToIdsResponse.

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/directories/<directory_id>/resolve-paths-to-ids" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY" \
  -d '{"paths":["/notes.txt"]}'

Create AI File

Creates an .ai configuration file in the directory. Response (201): CreateAiFileResponse.

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/directories/<directory_id>/ai-files" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY" \
  -d '{"filename":"workflow.ai","path":"/","workflow_type":"YOUR_WORKFLOW"}'

Trigger AI File Workflow

Poll GET /api/v2/jobs/{activity_id} after.

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/ai-files/<ai_file_id>/trigger" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY" \
  -d '{}'

Cancel AI File Workflow

curl -X POST "$LAYERPROOF_BASE_URL/api/v2/projects/<project_id>/ai-files/<ai_file_id>/cancel" \
  -H "X-API-KEY: $LAYERPROOF_API_KEY"

Agent behavior

When the user asks to manage project files (upload, update, confirm, download, delete), do the following.

1. Choose the right endpoint

Base path: /api/v2/projects/{projectId}. Replace project_id, directory_id, file_id as needed.

User intentEndpointMethod
Get upload URL for new file.../directories/{directoryId}/files/preparePOST
Get upload URL to update file.../directories/{directoryId}/files/prepare-updatePOST
Confirm upload after PUT.../files/{fileId}/confirmPOST
Get download URL.../files/{fileId}/download-urlGET
Get file metadata.../files/{fileId}GET
Delete file.../files/{fileId}DELETE
Create subdirectory.../directories/{directoryId}/subdirectoriesPOST
HTML preview URL.../directories/{directoryId}/files/{fileId}/preview-urlPOST
Resolve paths → presigned URLs.../directories/{directoryId}/resolve-assetsPOST
Resolve paths → file IDs.../directories/{directoryId}/resolve-paths-to-idsPOST
Create AI file.../directories/{directoryId}/ai-filesPOST
Trigger AI file.../ai-files/{aiFileId}/triggerPOST
Cancel AI file.../ai-files/{aiFileId}/cancelPOST

2. Build and run the request

Step 1 — Check environment variables first. Before running any curl command, verify both LAYERPROOF_BASE_URL and LAYERPROOF_API_KEY are set on the user's machine:

if [[ -z "${LAYERPROOF_BASE_URL}" ]]; then
  echo "ERROR: LAYERPROOF_BASE_URL is not set."
  return 1
fi
if [[ -z "${LAYERPROOF_API_KEY}" ]]; then
  echo "ERROR: LAYERPROOF_API_KEY is not set."
  return 1
fi

If running from a project directory with a .env.local file, load it first:

if [[ -f .env.local ]]; then
  set -a
  source .env.local
  set +a
fi

Step 2 — Auth: Include X-API-KEY: $LAYERPROOF_API_KEY. Read env vars; if missing, tell the user. Step 3 — Path: Resolve projectId, directoryId, fileId from context or user input. Step 4 — POST: Build JSON body from types above; run curl and show result. Step 5 — GET/DELETE: Build path only; run curl and show result.

3. Upload flow

Prepare → PUT file to upload_url → confirm with file_id. Then use file_id for get/download/delete.

4. Response handling

  • Always show raw JSON in a code block; show image + JSON if image URL present.
  • On error, show body and status code.

5. Example workflows

Workflow A — User: "Upload a PDF to project X in the root directory."

  1. Resolve projectId and directoryId (e.g. root directory from project or list directories). POST .../directories/{directoryId}/files/prepare with {"path":"/","file_name":"brief.pdf","mime_type":"application/pdf","size":<bytes>}; get upload_url, file_id, s3_key.
  2. Tell user to PUT the file to upload_url with Content-Type: application/pdf. Then POST .../files/{file_id}/confirm with {} (or {"metadata":{}}).
  3. Show JSON; use file_id for later get/download/delete.

Workflow B — User: "Upload two reference docs to the project, then use them when generating the slide deck outline."

  1. For each file: prepare with path (e.g. /ref1.pdf, /ref2.docx) → user uploads to upload_url → confirm. Capture both file_id and s3_key (if returned) for each.
  2. If outline generation accepts project file references: pass the project file identifiers (e.g. s3_keys or file_ids) into the slide-deck outline/generate request (e.g. file_s3_keys or equivalent). Otherwise use public-files for outline references and keep project files for project-scoped use only.
  3. Hand off to slide-decks: POST outline/generate with the resolved keys; poll job; get deck.

Workflow C — User: "Update an existing file in the project (new version) and get a download URL after."

  1. Resolve projectId, directoryId, and existing file path. POST .../directories/{directoryId}/files/prepare-update with {"path":"/brief.pdf","mime_type":"application/pdf","size":<new_bytes>}; get upload_url, file_id.
  2. User PUTs new content to upload_url; then POST .../files/{file_id}/confirm. GET .../files/{file_id}/download-url to show the user a temporary download link.
  3. On error (e.g. path not found), show response body and suggest verifying path and project/directory IDs.

Response format (required)

  • (if response contains url to show image) please show image and show json response instead of table
  • Always show the raw JSON response (verbatim) in a JSON code block.
  • If the response contains a URL for an image, render/show the image and also show the JSON response (do not convert to a table).

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.17%
按下载量换算58

Claude

27.61%
按下载量换算48

Cursor

20.06%
按下载量换算35

Gemini CLI

10.04%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills