principle

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Principle Skill

Principle 技能

Overview

概述

Enables Claude to manage Principle animation projects through file organization and documentation, as Principle is a macOS desktop application. Claude can help organize project files and document animation specifications.
由于Principle是一款macOS桌面应用,该技能可让Claude通过文件管理与文档记录来管理Principle动画项目。Claude能够帮助整理项目文件并记录动画规范。

Quick Install

快速安装

bash
curl -sSL https://canifi.com/skills/principle/install.sh | bash
Or manually:
bash
cp -r skills/principle ~/.canifi/skills/
bash
curl -sSL https://canifi.com/skills/principle/install.sh | bash
或手动安装:
bash
cp -r skills/principle ~/.canifi/skills/

Setup

配置

Configure via canifi-env:
bash
undefined
通过canifi-env进行配置:
bash
undefined

First, ensure canifi-env is installed:

首先,确保已安装canifi-env:

canifi-env set PRINCIPLE_PROJECTS_PATH "/Users/username/Documents/Principle"
undefined
canifi-env set PRINCIPLE_PROJECTS_PATH "/Users/username/Documents/Principle"
undefined

Privacy & Authentication

隐私与认证

Your credentials, your choice. Canifi LifeOS respects your privacy.
您的凭据,由您掌控。 Canifi LifeOS尊重您的隐私。

Option 1: Manual Browser Login (Recommended)

选项1:手动浏览器登录(推荐)

If you prefer not to share credentials with Claude Code:
  1. Complete the Browser Automation Setup using CDP mode
  2. Login to the service manually in the Playwright-controlled Chrome window
  3. Claude will use your authenticated session without ever seeing your password
如果您不想与Claude Code共享凭据:
  1. 使用CDP模式完成浏览器自动化设置
  2. 在Playwright控制的Chrome窗口中手动登录服务
  3. Claude将使用您已认证的会话,全程不会获取您的密码

Option 2: Environment Variables

选项2:环境变量

If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果您愿意共享凭据,可将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
注意:存储在canifi-env中的凭据仅可在您的本地设备访问,绝不会被传输至其他地方。

Capabilities

功能

  • Organize Principle project files
  • Document animation specifications
  • Export animation previews
  • Manage project versions
  • Catalog component animations
  • Create animation documentation
  • 整理Principle项目文件
  • 记录动画规范
  • 导出动画预览
  • 管理项目版本
  • 分类组件动画
  • 创建动画文档

Usage Examples

使用示例

Example 1: Organize Animation Files

示例1:整理动画文件

User: "Organize my Principle animation files by project"
Claude: I'll organize your Principle files.
1. Scanning Principle projects directory
2. Identifying .prd files
3. Creating project-based folder structure
4. Moving files to appropriate folders
5. Creating index of all animations
用户:“按项目分类整理我的Principle动画文件”
Claude:我将为您整理Principle文件。
1. 扫描Principle项目目录
2. 识别.prd文件
3. 创建基于项目的文件夹结构
4. 将文件移动至对应文件夹
5. 创建所有动画的索引

Example 2: Document Animation Specs

示例2:记录动画规范

User: "Create documentation for our button animation specs"
Claude: I'll create animation documentation.
1. Reviewing animation requirements
2. Documenting timing curves
3. Specifying duration and properties
4. Creating developer-friendly spec sheet
5. Saving to project documentation
用户:“为我们的按钮动画规范创建文档”
Claude:我将创建动画文档。
1. 查看动画需求
2. 记录时间曲线
3. 明确时长与属性
4. 创建面向开发者的规范表
5. 保存至项目文档

Example 3: Catalog Components

示例3:组件分类

User: "Create a catalog of all our animated components"
Claude: I'll create a component catalog.
1. Listing all Principle project files
2. Extracting component information
3. Organizing by component type
4. Creating searchable documentation
用户:“创建我们所有动画组件的分类目录”
Claude:我将创建组件分类目录。
1. 列出所有Principle项目文件
2. 提取组件信息
3. 按组件类型分类
4. 创建可搜索的文档

Authentication Flow

认证流程

Principle is a desktop application and does not require web authentication. Claude assists with file management and documentation tasks.
Principle是桌面应用,无需网页认证。Claude仅协助完成文件管理与文档记录任务。

Error Handling

错误处理

  • File Not Found: Verify project path configuration
  • Permission Denied: Check folder access permissions
  • Invalid File: Verify .prd file integrity
  • Directory Missing: Create necessary folder structure
  • Export Failed: Check available disk space
  • 文件未找到:验证项目路径配置
  • 权限不足:检查文件夹访问权限
  • 文件无效:验证.prd文件完整性
  • 目录缺失:创建必要的文件夹结构
  • 导出失败:检查可用磁盘空间

Self-Improvement Instructions

自我优化说明

When working with Principle projects:
  1. Document common animation patterns
  2. Update file organization strategies
  3. Track version file naming conventions
  4. Log documentation template improvements
处理Principle项目时:
  1. 记录常见动画模式
  2. 更新文件管理策略
  3. 跟踪版本文件命名规范
  4. 记录文档模板的改进方案

Notes

注意事项

  • Principle is macOS-only desktop app
  • .prd files are Principle project format
  • Preview exports can be video or GIF
  • Works well with Sketch/Figma imports
  • Animation timing uses cubic bezier curves
  • Principle仅支持macOS系统
  • .prd是Principle项目文件格式
  • 预览导出格式可为视频或GIF
  • 可与Sketch/Figma导入功能良好配合
  • 动画时间采用三次贝塞尔曲线