Communitygithub.com

jeremylongshore/tons-of-skills-marketplace

使用 AppFolio API 数据构建物业管理仪表板。

tons-of-skills-marketplace 是什么?

该技能提供了一套完整的物业管理流程,用于与AppFolio Stack API集成,支持从身份验证到创建/更新物业、管理租户和租约、以及查询入住率的全生命周期操作。它使用OAuth 2.0客户端凭证进行服务器到服务器通信,所有端点返回JSON,并通过cursor参数支持分页。技能内置了严格的安全和回滚要求,建议在沙箱环境中进行练习后再投入生产。适用于AppFolio合作伙伴开发人员,帮助快速构建物业仪表板、租户管理和入住率监控等功能。

兼容平台✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/HEAD/plugins/saas-packs/appfolio-pack/skills/appfolio-core-workflow-a

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

AppFolio — 物业与租户管理

概述

用于 AppFolio 物业管理的集成主工作流。涵盖物业的完整生命周期:创建和更新物业记录、管理租户档案和租约协议,以及查询入住率数据。使用 AppFolio Stack API,采用 OAuth 2.0 客户端凭证实现服务器到服务器的访问。所有端点均返回 JSON,并通过 cursor 参数支持大型投资组合的分页。

先决条件

  • 一份有效的 AppFolio 合作伙伴/API 合同,确认分配的投资组合基础 URL、身份验证方法、批准的权限范围以及写入能力;请勿从教程或其他投资组合推断这些信息。
  • 一个独立的沙箱环境,包含可处置的物业、单元和合成租户记录,以及一个凭证拥有者和一个批准的请求预算。
  • 幂等键和经操作员批准的回滚/对账流程,用于物业、租户和租约写入(这些操作可能会产生真实的法律和账单后果)。

操作说明

  1. 在将任何客户端配置复制到环境之前,先确认目标投资组合的提供商颁发的基础 URL 和身份验证流程。
  2. 仅在沙箱合成夹具上使用幂等键执行创建/更新路径;在重试不确定的写入之前,请检索规范记录。
  3. 在创建租约前,验证所有权、租约日期和单元可用性;仅输出记录 ID 和脱敏的状态证据。
  4. 只有在经过分阶段演练证明回滚、对账以及最小权限范围边界之后,才提升具有写入能力的工作流。

步骤 1:身份验证并初始化客户端

const token = await fetch('https://api.appfolio.com/oauth/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: process.env.APPFOLIO_CLIENT_ID!,
    client_secret: process.env.APPFOLIO_CLIENT_SECRET!,
    scope: 'properties tenants leases',
  }),
}).then(r => r.json());
const headers = { Authorization: `Bearer ${token.access_token}`, 'Content-Type': 'application/json' };

步骤 2:创建或更新物业

const property = await fetch('https://api.appfolio.com/v1/properties', {
  method: 'POST', headers,
  body: JSON.stringify({
    name: 'Sunrise Apartments',
    address: { street: '100 Main St', city: 'Austin', state: 'TX', zip: '78701' },
    type: 'residential',
    units: [
      { number: '101', bedrooms: 2, bathrooms: 1, rent: 1450 },
      { number: '102', bedrooms: 1, bathrooms: 1, rent: 1100 },
    ],
  }),
}).then(r => r.json());
console.log(`物业已创建: ${property.id}`);

步骤 3:添加租户和租约

const tenant = await fetch('https://api.appfolio.com/v1/tenants', {
  method: 'POST', headers,
  body: JSON.stringify({
    first_name: 'Test', last_name: 'Tenant',
    email: '[email protected]', phone: '555-0100',
  }),
}).then(r => r.json());

await fetch('https://api.appfolio.com/v1/leases', {
  method: 'POST', headers,
  body: JSON.stringify({
    property_id: property.id, unit_number: '101',
    tenant_id: tenant.id, start_date: '2026-05-01', end_date: '2027-04-30',
    monthly_rent: 1450, security_deposit: 1450,
  }),
}).then(r => r.json());

步骤 4:查询入住率

const units = await fetch(
  `https://api.appfolio.com/v1/properties/${property.id}/units?status=vacant`,
  { headers },
).then(r => r.json());
console.log(`空闲单元: ${units.data.length} / ${units.meta.total}`);

错误处理

问题原因修复
401 Unauthorized令牌已过期或无效使用客户端凭证重新进行身份验证
404 Not Found物业/租户 ID 错误在引用之前确认资源 ID 是否存在
422 Unprocessable缺少必填字段检查响应体中的 errors[] 数组
409 Conflict该单元存在重复租约在创建之前查询现有租约
429 Too Many Requests超出速率限制使用 Retry-After 标头值退避

输出

成功运行将创建一个包含单元的物业,添加一个租户,通过租约绑定他们,并报告空闲单元数量。控制台输出将在创建时确认每个资源 ID。

示例

对于租约创建变更,请针对一个命名的合成沙箱单元和具有稳定幂等键的租户运行。读取物业和当前租约,执行一次候选写入,然后读回生成的租约并仅记录 ID、日期和对账状态。再次运行相同请求以证明它不会创建第二个租约。如果提供商合同、端点、授权或先前写入结果无法验证,则在任何写入之前停止,并将情况提交给投资组合操作员进行对账。

资源

下一步

继续使用 appfolio-core-workflow-b 处理维护请求和付款跟踪。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page for positioning, plan a conversion-optimized page layout, or design a launch page. Examples: "landing page for product launch", "conversion-optimized layout for SaaS

jeremylongshore/tons-of-skills-marketplace

Use when asked to design growth-optimized landing pages, activation funnel layouts, or experiment-friendly page structures. Examples: "growth-optimized landing", "activation funnel layout", "A/B testable page

jeremylongshore/tons-of-skills-marketplace

Use when asked to structure a landing page, design page layout for conversion, or plan landing page information architecture. Examples: "landing page structure for SaaS", "conversion-optimized layout

jeremylongshore/tons-of-skills-marketplace

Generate polished demo videos from a single prompt. Use when the user asks to create a demo video, product walkthrough, feature showcase, or animated presentation. Trigger with "make a demo video", "create a product video", "demo walkthrough", or "feature showcase video".

jeremylongshore/tons-of-skills-marketplace

Track cryptocurrency portfolio with real-time valuations, allocation analysis, and P&L tracking. Use when checking portfolio value, viewing holdings breakdown, analyzing allocations, or exporting portfolio data. Trigger with phrases like "show my portfolio", "check crypto holdings", "portfolio allocation", "track my crypto", or "export portfolio".

jeremylongshore/tons-of-skills-marketplace

Runs the full release workflow for the current project. Commits any uncommitted changes, pushes to remote, creates and merges a PR if on a feature branch, determines the next semver version from conventional commits, creates an annotated git tag and GitHub release with generated notes, cleans up merged branches, and returns to a clean main. Use when the user says promote, ship, release, commit and push, tag and release, or get back to main.

jeremylongshore/tons-of-skills-marketplace

Agent skill at plugins/productivity/content-multiplier/skills/channel-formats/SKILL.md

jeremylongshore/tons-of-skills-marketplace

Operate an evidence-backed editorial queue, balance topic and format coverage, schedule approved drafts, and reconcile backlog state with the publishing system. Use when choosing or scheduling the next blog work. Trigger with "show the editorial calendar" or "pick the next topic".

jeremylongshore/tons-of-skills-marketplace

Configure CI/CD pipeline for AppFolio property management integrations. Trigger: "appfolio CI".

jeremylongshore/tons-of-skills-marketplace

Diagnose and fix common AppFolio API integration errors. Trigger: "appfolio error".

jeremylongshore/tons-of-skills-marketplace

Automate tenant management and lease operations with AppFolio. Trigger: "appfolio tenant management".

jeremylongshore/tons-of-skills-marketplace

Collect AppFolio API debug evidence for support tickets. Trigger: "appfolio debug".

jeremylongshore/tons-of-skills-marketplace

Deploy AppFolio integration service to cloud infrastructure. Trigger: "deploy appfolio".

jeremylongshore/tons-of-skills-marketplace

Query AppFolio properties, units, and tenants via REST API. Trigger: "appfolio hello world".

jeremylongshore/tons-of-skills-marketplace

Configure AppFolio Stack API authentication with OAuth 2.0. Use when setting up property management API access, registering as an AppFolio Stack partner, or configuring client credentials for API calls. Trigger: "install appfolio", "setup appfolio", "appfolio auth", "appfolio API key".

jeremylongshore/tons-of-skills-marketplace

Set up local development for AppFolio property management API integration. Trigger: "appfolio local dev".

jeremylongshore/tons-of-skills-marketplace

Production readiness checklist for AppFolio integrations. Trigger: "appfolio production checklist".

jeremylongshore/tons-of-skills-marketplace

Handle AppFolio API rate limits with throttling and backoff. Trigger: "appfolio rate limit".

jeremylongshore/tons-of-skills-marketplace

Reference architecture for AppFolio property management integration. Trigger: "appfolio architecture".

jeremylongshore/tons-of-skills-marketplace

Apply production-ready patterns for AppFolio REST API integration. Trigger: "appfolio patterns".

相关技能