skyciv-api-v3
Skill11 starsChanged 32 days agoMITView on GitHub
You are an agent that interacts with the SkyCiv API. This skill covers authentication, session management, the request/response envelope, and all common patterns shared across every SkyCiv API function. All requests are HTTP POST to: Content-Type must be application/json. Every API call sends a single JSON body with three top-level keys: First call — always provide key: Subsequent calls within 30 min — provide both to allow automatic fallback if session expires: When session_id is valid it is used; if…
- Reads credentials
In this repository17 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- analysis-resultsSkill
- baseplateSkill
- build-quick-design-calculatorSkill
- cloudcad-apiSkill
- foundation-apiSkill
- load-combinationsSkill
- load-gen-apiSkill
- qa-engineerSkill
- rendererSkill
- run-quick-designSkill
- s3d-apiSkill
- s3d-appsSkill
- schema-agentSkill
- section-selectorSkill
- skill-writerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
All requests are HTTP POST to:
- Distinctive: line 21
Every API call sends a single JSON body with three top-level keys:
- Very specific: line 169
Always check response.status === 0 before using results.
- Very specific: line 235
Use result_filter and lc_filter in solve/results calls to return only what you need.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SkyCiv Core API Skill
You are an agent that interacts with the SkyCiv API. This skill covers authentication, session management, the request/response envelope, and all common patterns shared across every SkyCiv API function.
API Endpoint
All requests are HTTP POST to:
https://api.skyciv.com/v3Content-Type must be application/json.
Request Object Structure
Every API call sends a single JSON body with three top-level keys:
{
"auth": { ... }, // required
"options": { ... }, // optional
"functions": [ ... ] // required — ordered array of functions to run
}auth
| Key | Type | Description |
username | string | SkyCiv account email / username |
key | string | API key from account settings (required on first call) |
session_id | string | Reuse an open session from a prior call (optional) |
First call — always provide key:
{
"auth": {
"username": "user@example.com",
"key": "YOUR_API_KEY"
}
}Subsequent calls within 30 min — provide both to allow automatic fallback if session expires:
{
"auth": {
"username": "user@example.com",
"key": "YOUR_API_KEY",
"session_id": "SESSION_ID_FROM_PREVIOUS_RESPONSE"
}
}When
session_idis valid it is used; if expired,keystarts a fresh session. Ifkeyis absent andsession_idis expired, the call fails.
options
All fields optional.
| Key | Type | Default | Description |
validate_input | boolean | false | Run model validation before executing. Strongly recommended. |
response_data_only | boolean | false | Return only response.data from the last function, omitting the full functions array. Reduces response size. |
timeout | int (ms) | auto | Override solver timeout. Only use for calls that need extra time. |
return_log | boolean | false | Include a process log for debugging. |
return_base64_image_on_error | boolean | true | Return a screenshot on error for debugging. |
response_webhook_url | string | — | Send the response to this URL instead of the caller (useful for long-running jobs). |
timezone | number | UTC | UTC offset for report timestamps (e.g. 10 for GMT+10). |
{
"options": {
"validate_input": true,
"response_data_only": false
}
}functions
An ordered array of function objects. Functions execute sequentially. Each object must have:
{
"function": "Namespace.function.name",
"arguments": { ... }
}return_data (boolean, default false) can be added to any function object to omit that function's data from the response.
S3D.session.start
Must always be the first function in the array — even when reusing a session_id.
| Key | Type | Default | Description |
keep_open | boolean | false | Keep the session alive for 30 min. Subsequent calls using the returned session_id will be 4–8× faster by skipping re-authentication. |
{
"function": "S3D.session.start",
"arguments": {
"keep_open": true
}
}Response includes:
{
"response": {
"session_id": "Ofd4WYH...",
"last_session_id": "Ofd4WYH...",
"session_expiry_time": 1605153571,
"msg": "S3D session successfully started.",
"status": 0,
"function": "S3D.session.start"
}
}Store last_session_id for the next call's auth.session_id.
Response Object Structure
{
"response": {
"data": { ... },
"msg": "Human-readable message",
"status": 0,
"function": "last-function-name",
"last_session_id": "...",
"monthly_api_credits": {
"quota": 6000,
"total_used": 22,
"used_this_call": 1
}
},
"functions": [
{ /* result for functions[0] */ },
{ /* result for functions[1] */ },
{ /* ... */ }
]
}| Field | Meaning |
response.status | 0 = success, ≥1 = failure |
response.data | Data from the last function executed |
response.msg | Status or error message |
functions[i] | Per-function result at index i |
Always check response.status === 0 before using results.
Full Minimal Example
Session start → set model → solve:
{
"auth": {
"username": "user@example.com",
"key": "YOUR_API_KEY"
},
"options": {
"validate_input": true
},
"functions": [
{
"function": "S3D.session.start",
"arguments": { "keep_open": false }
},
{
"function": "S3D.model.set",
"arguments": { "s3d_model": { /* model object */ } }
},
{
"function": "S3D.model.solve",
"arguments": { "analysis_type": "linear" }
}
]
}Available Function Namespaces
| Namespace | Purpose |
S3D.session | Session management |
S3D.model | Set, solve, repair, screenshot, mesh a structural model |
S3D.results | Retrieve and post-process analysis results |
S3D.file | Save/open/share S3D files in cloud storage |
S3D.design | Member and RC design checks |
S3D.SB | Section Builder — load library sections, build custom shapes |
standalone.foundation | Standalone foundation design (piles only at the moment). See the foundation-api skill. |
standalone.member | Standalone member design |
standalone.loads | Wind and snow loads |
cloudcad.model | Create CAD models |
cloudcad.file | Save/open CAD files in cloud storage |
Common Patterns
Check success before using data:
if (response.status === 0) {
const data = response.data;
} else {
console.error(response.msg);
}Minimise response size with filters:
Use result_filter and lc_filter in solve/results calls to return only what you need. Only if you're confident that load combination exists.
Reuse sessions for speed:
Set keep_open: true in S3D.session.start, then pass the returned last_session_id as auth.session_id in subsequent calls. This skips re-authentication and is 4–8× faster.
Troubleshooting
"Your API credentials could not be authenticated. Please try again." / any auth-rejection response.msg:
This message comes straight from the live API when auth.username/auth.key don't validate — it is not something a client can trigger by sending a malformed request shape (a shape bug produces a different kind of error, e.g. about the missing/invalid field itself). If you see this and the {username, key} shape already matches this skill's docs exactly, don't keep editing the request code looking for a bug — the credentials themselves are almost certainly the problem:
- Confirm this same failure reproduces across every function call in the account (e.g. a plain
S3D.model.solveand astandalone.loads.*/cloudcad.*call), not just one namespace — if it's every call, that confirms it's account-wide, not specific to whichever call you were debugging. - Re-copy the username (account email) and API key fresh from https://platform.skyciv.com/api — a stale, truncated, or wrong-field value pasted into
.env(or wherever credentials are stored) is the most common cause. A real SkyCiv API key is a long alphanumeric string (tens of characters); a much shorter value is a strong signal something got truncated or the wrong value was pasted. - If credentials are loaded from a
.envfile viadotenv, double check the value actually landed in.env(the file actually read at runtime) and not just.env.example(a template file, not loaded by the app) — easy to mix up when copying a real key in for local testing.
Recommendations
Allow user to download API Object If prototyping, it's helpful to allow users to see and download the API input object being sent to the SkyCiv API. It makes troubleshooting a bit easier. So prepare the API object all client-side, then only when they want to send it to the API do you actually send it.
Logging It's also a good idea to show a log of what the software is doing, what API it is calling. Makes it easier to find where things have gone wrong.
Transparency and Results It's also helpful to show results for each step in the API, even if the results are partial. For example, if you intend to run S3D.model.solve and then plan to pass your results to Quick Design - it's a good idea to show some results for the S3D.model.solve so we can see that part is running and you can show what information you're passing to the Quick Design. This transparency is very valuable to the engineer.
Return the link to the S3D model. Once the model is saved to cloud storage, it's a good idea to send back the link to the UI so the user can open the model and validate it's been built correctly. They can also inspect the loads, load combos and structural data much more easily.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

