factorialco/factorial-code-skills

fcode-examples

Reference implementations for Factorial Code — a complete marketplace payroll integration, a custom app with full install/uninstall lifecycle, an OAuth account connection from a form, and utility processes.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/factorialco/factorial-code-skills --skill fcode-examples

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Factorial Code — reference implementations

Worked, production-shaped examples of complete Factorial Code apps. Each reference in references/ walks through one real sample: its architecture, the key code, and how to adapt it. They complement the rule-focused skills (fcode-core-concepts, fcode-javascript/fcode-python, fcode-json-schema, fcode-forms, fcode-cli): those tell you how to write fcode code, this one shows what a finished app looks like.

Adapt, don't paste. These are patterns to rebuild for the user's actual vendor/requirements — rename slugs, variables, and mappings; drop what the use case doesn't need.

Which reference to read

You are building…Read
A marketplace integration that delivers Factorial data (payroll, leaves, …) to an external system`references/integration-acme.md`
A custom app with install/uninstall lifecycle: setup form, webhooks, schedules`references/custom-app-linear.md`
A one-shot automation: export/report generation, file processing`references/utility-processes.md`
An app that connects a third-party account through OAuth from a form (no pasted API tokens)`references/oauth-connect.md`

Pattern index

Where to find a specific pattern, regardless of which app you build:

PatternReference
Extending the outbound-sync base class (OutboundSync)integration-acme
Per-item API push vs aggregate-to-file deliveryintegration-acme
Reporting per-item sync status (success / invalid / failed)integration-acme
Webhook entry point authenticated by the platform, not in process codeintegration-acme, custom-app-linear
Activating webhook / form triggers in metadata.json, and protecting the webhook (webhook.authMode + the workspace webhookAuth, marketplace appRole)integration-acme, custom-app-linear
Multi-step setup form (nextProcessId chaining)custom-app-linear
Dynamic form dropdowns via preRenderProcess + #/variablescustom-app-linear
OAuth connect button in a form (ui:widget: "oauth"): pre-render calls fcode.oauth.start(), the platform runs both redirect legs and invokes the completion process, which exchanges the code and 302s to the SDK callback page; onComplete: "reload" renders the connected stateoauth-connect
Creating webhooks + schedules at install, recording them for uninstallcustom-app-linear
Polling with a datastore cursor + idempotency (dedup map, or vendor upsert when available)custom-app-linear
Best-effort uninstall / teardowncustom-app-linear
Storage upload + signed download URL + email with fcode.sendMailutility-processes
Reading a form-uploaded file from Storageutility-processes
Calling the Factorial API SDK (factorial-sdk module)all three

The base workspaces (always present — never recreate)

Every fcode App workspace inherits shared modules from the base apps. Import them with fcode.import(...) / fcode.import_module(...); do not reimplement them:

ModuleFromProvides
factorial-sdkbase-appcreateFactorialClient() — authenticated @factorialco/api-client / factorial-api-client instance
factorial-utilsbase-appgetCompanyId(), setupWebhook(), listWebhookSubscriptions(), deleteWebhookSubscription()
fcode-formsbase-appForm-schema builders: selectField(), toOptions(), …
mail-helperbase-appbrandedHtml() for styled email bodies
error-handlerbase-appShared error handling
outbound-syncbase-integration-appOutboundSync base class for marketplace syncs

Integration apps inherit base-integration-app (which inherits base-app); custom apps inherit base-app directly.

Note: the fcode-forms module above (form-schema builders you fcode.import) is unrelated to the fcode-forms skill, which documents embedding forms on webpages.

The references keep code compact and omit routine logging; real implementations should log verbosely through the shared fcode-logs module (see fcode-javascript / fcode-python).

Language variants

Every sample exists in JavaScript (Node.js v22) and Python (3.13) with identical structure and behavior. References show JavaScript; the Python variant differs only in idiom (main.py, fcode.import_module, fcode.send_mail, snake_case) — see fcode-python.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
factorialco
커뮤니티

fcode-code-validation

Pre-production review of a Factorial Code app — clone the workspace read-only, run the static check catalog, classify findings as Blocker/Warning/Suggestion, and write APPVALIDATIONREPORT.md with a ✅/❌ promotion verdict. Use when validating, reviewing, or auditing a Factorial Code (fcode) app or workspace before a release, or when asked whether an app is ready to ship.

설치 수
1
GitHub Stars
1
업데이트
10월 20일
factorialco
커뮤니티

fcode-cli

Use the Factorial Code CLI (fcode) for local development and cloud sync — the pull → add → run → push flow, the local webhook/forms server, workspace versions and aliases, and the workspace config files (metadata.json, settings.json, variables). Use when running fcode commands, testing a process locally, syncing to the cloud, cloning every App of a development team, inspecting or resolving differences between local and cloud, or configuring a process's webhook, Factorial Action (the factorial bl

설치 수
1
GitHub Stars
1
업데이트
10월 20일
factorialco
커뮤니티

fcode-core-concepts

Factorial Code platform architecture and core concepts — processes, modules, execution context, variables, inheritance from parent workspaces, datastore, file storage, workspace structure, and naming conventions. Use when building, editing, or reasoning about any Factorial Code (fcode) process, module, or workspace; start here before writing process or module code.

설치 수
1
GitHub Stars
1
업데이트
10월 20일
factorialco
커뮤니티

fcode-forms

Embed a Factorial Code process's input-parameter form on a webpage — embed methods, version pinning to the stable alias, what a public form means for the process behind it, driving behavior from the process return value, styling and themes, multi-step flows, and file uploads. Use when embedding, configuring, styling, or wiring up a Factorial Code (fcode) form.

설치 수
1
GitHub Stars
1
업데이트
10월 20일