/revit-bim:acc-docsfrom revit-bim
Manages Autodesk Construction Cloud Docs via APS API: lists folders/files, uploads/downloads documents, creates folder structures, manages transmittals, reviews, and packages. Useful for automating document control workflows in ACC.
Ships in revit-bim. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Manage ACC Docs for:
"$ARGUMENTS"
acc-api-setup skill first)APSClient class available (from acc-api-setup)pip install requestsimport os, requests
# ── Configuration ─────────────────────────────────────────────────────────────
HUB_ID = os.environ.get("APS_HUB_ID", "b.YOUR_HUB_ID")
PROJECT_ID = os.environ.get("APS_PROJECT_ID", "b.YOUR_PROJECT_ID") # with b. prefix
BASE_URL = "https://developer.api.autodesk.com"
# ─────────────────────────────────────────────────────────────────────────────
def get_top_folders(client, hub_id, project_id):
"""Get the top-level folders in an ACC project."""
url = f"{BASE_URL}/project/v1/hubs/{hub_id}/projects/{project_id}/topFolders"
data = client.get(url)
return data.get("data", [])
def list_folder_contents(client, project_id, folder_id, depth=0, results=None):
"""Recursively list all items in a folder."""
if results is None:
results = []
url = f"{BASE_URL}/data/v1/projects/{project_id}/folders/{folder_id}/contents"
page_url = url
while page_url:
data = client.get(page_url)
items = data.get("data", [])
links = data.get("links", {})
for item in items:
item_type = item["type"] # "folders" or "items"
attrs = item["attributes"]
indent = " " * depth
if item_type == "folders":
results.append({
"type": "Folder",
"name": attrs["name"],
"id": item["id"],
"depth": depth,
"path": indent + "📁 " + attrs["name"],
})
# Recurse into subfolder
list_folder_contents(client, project_id, item["id"], depth + 1, results)
elif item_type == "items":
# Get the latest version info
version = item.get("relationships", {}).get("tip", {}).get("data", {})
results.append({
"type": "File",
"name": attrs["displayName"],
"id": item["id"],
"version_id": version.get("id", ""),
"depth": depth,
"path": indent + "📄 " + attrs["displayName"],
})
# Handle pagination
next_link = links.get("next", {})
page_url = next_link.get("href") if next_link else None
return results
# ── Run ───────────────────────────────────────────────────────────────────────
if __name__ == "__main__":
# client = APSClient(...) # from acc-api-setup
folders = get_top_folders(client, HUB_ID, PROJECT_ID)
all_files = []
for folder in folders:
print(f"\n=== {folder['attributes']['name']} ===")
contents = list_folder_contents(client, PROJECT_ID, folder["id"])
for item in contents:
print(item["path"])
all_files.extend(contents)
print(f"\nTotal items: {len(all_files)}")
import os, requests
BASE_URL = "https://developer.api.autodesk.com"
def get_versions(client, project_id, item_id):
"""List all versions of a file."""
url = f"{BASE_URL}/data/v1/projects/{project_id}/items/{item_id}/versions"
data = client.get(url)
versions = []
for v in data.get("data", []):
attrs = v["attributes"]
versions.append({
"version_number": attrs.get("versionNumber", ""),
"version_id": v["id"],
"file_name": attrs.get("name", ""),
"file_size_mb": round(attrs.get("storageSize", 0) / 1048576, 2),
"last_modified": attrs.get("lastModifiedTime", ""),
"created_by": attrs.get("lastModifiedUserName", ""),
})
return versions
def download_version(client, project_id, version_id, output_path):
"""Download a specific file version."""
# Step 1: Get the storage location (S3/OSS signed URL)
url = f"{BASE_URL}/data/v1/projects/{project_id}/versions/{version_id}"
data = client.get(url)
download_url = (data.get("relationships", {})
.get("storage", {})
.get("meta", {})
.get("link", {})
.get("href"))
if not download_url:
print("No direct download URL. File may require OSS signed URL.")
return False
# Step 2: Stream download
resp = requests.get(download_url, headers=client.headers(), stream=True)
resp.raise_for_status()
os.makedirs(os.path.dirname(output_path), exist_ok=True)
with open(output_path, "wb") as f:
for chunk in resp.iter_content(chunk_size=8192):
f.write(chunk)
print(f"Downloaded: {output_path}")
return True
# Example usage:
# versions = get_versions(client, PROJECT_ID, ITEM_ID)
# for v in versions:
# print(f"v{v['version_number']} — {v['last_modified']} by {v['created_by']}")
Uploading to ACC requires three steps: create a storage object, upload binary data, then create a new item/version.
import os, requests, math
BASE_URL = "https://developer.api.autodesk.com"
def upload_file_to_acc(client, project_id, folder_id, local_file_path):
"""Upload a file to an ACC Docs folder. Returns the new item ID."""
file_name = os.path.basename(local_file_path)
file_size = os.path.getsize(local_file_path)
# ── Step 1: Create a storage location (OSS object) ───────────────────────
storage_resp = client.post(
f"{BASE_URL}/data/v1/projects/{project_id}/storage",
{
"jsonapi": {"version": "1.0"},
"data": {
"type": "objects",
"attributes": {"name": file_name},
"relationships": {
"target": {
"data": {"type": "folders", "id": folder_id}
}
}
}
}
)
object_id = storage_resp["data"]["id"]
upload_url = storage_resp["data"]["relationships"]["storage"]["meta"]["link"]["href"]
# ── Step 2: Upload the binary to OSS ─────────────────────────────────────
# For files >5 MB, use resumable upload. For simplicity, single-part shown here.
with open(local_file_path, "rb") as f:
file_data = f.read()
upload_resp = requests.put(
upload_url,
headers={"Authorization": "Bearer " + client.get_token(),
"Content-Type": "application/octet-stream"},
data=file_data
)
upload_resp.raise_for_status()
print(f"Uploaded binary: {file_name} ({file_size} bytes)")
# ── Step 3a: Create a new Item (first upload of this file) ───────────────
create_resp = client.post(
f"{BASE_URL}/data/v1/projects/{project_id}/items",
{
"jsonapi": {"version": "1.0"},
"data": {
"type": "items",
"attributes": {
"displayName": file_name,
"extension": {
"type": "items:autodesk.core:File",
"version": "1.0"
}
},
"relationships": {
"tip": {
"data": {"type": "versions", "id": "1"}
},
"parent": {
"data": {"type": "folders", "id": folder_id}
}
}
},
"included": [{
"type": "versions",
"id": "1",
"attributes": {
"name": file_name,
"extension": {
"type": "versions:autodesk.core:File",
"version": "1.0"
}
},
"relationships": {
"storage": {
"data": {"type": "objects", "id": object_id}
}
}
}]
}
)
item_id = create_resp["data"]["id"]
print(f"Item created in ACC: {item_id}")
return item_id
# Usage:
# item_id = upload_file_to_acc(client, PROJECT_ID, FOLDER_ID, r"C:\Drawings\A-DR-001.pdf")
BASE_URL = "https://developer.api.autodesk.com"
def create_folder(client, project_id, parent_folder_id, folder_name):
"""Create a subfolder under an existing folder. Returns new folder ID."""
resp = client.post(
f"{BASE_URL}/data/v1/projects/{project_id}/folders",
{
"jsonapi": {"version": "1.0"},
"data": {
"type": "folders",
"attributes": {
"name": folder_name,
"extension": {
"type": "folders:autodesk.core:Folder",
"version": "1.0"
}
},
"relationships": {
"parent": {
"data": {"type": "folders", "id": parent_folder_id}
}
}
}
}
)
new_id = resp["data"]["id"]
print(f"Created folder: {folder_name} → {new_id}")
return new_id
def create_folder_tree(client, project_id, root_folder_id, tree):
"""
Create a nested folder structure from a dict.
tree = {
"01 Architecture": {
"Drawings": {},
"Models": {}
},
"02 Structure": {}
}
"""
def recurse(parent_id, subtree):
for name, children in subtree.items():
new_id = create_folder(client, project_id, parent_id, name)
if children:
recurse(new_id, children)
recurse(root_folder_id, tree)
# Example:
# STANDARD_STRUCTURE = {
# "01 Architecture": {"Drawings": {}, "Models": {}, "Reports": {}},
# "02 Structure": {"Drawings": {}, "Models": {}},
# "03 MEP": {"Drawings": {}, "Models": {}},
# "04 Coordination": {"Clash Reports": {}, "Issue Log": {}},
# "99 Admin": {"BEP": {}, "Contracts": {}},
# }
# create_folder_tree(client, PROJECT_ID, ROOT_FOLDER_ID, STANDARD_STRUCTURE)
For Transmittals (formally issuing document sets):
GET /construction/transmittals/v1/projects/{projectId}/transmittals
POST /construction/transmittals/v1/projects/{projectId}/transmittals
GET /construction/transmittals/v1/projects/{projectId}/transmittals/{transmittalId}
For Document Reviews:
GET /construction/reviews/v1/projects/{projectId}/reviews
POST /construction/reviews/v1/projects/{projectId}/reviews
For Packages (bundled document sets):
GET /construction/packages/v1/projects/{projectId}/packages
POST /construction/packages/v1/projects/{projectId}/packages
All require: Authorization: Bearer {3-legged-token} and x-ads-region: US (or EU)
| Task | Approach |
|---|---|
| List drawings on a sheet set | Traverse top folders → "Project Files" → discipline folder |
| Find latest PDF of a drawing | GET /items/{id}/versions → filter by .pdf extension |
| Create a transmittal | POST to transmittals API with file version IDs |
| Bulk upload from local folder | Loop upload_file_to_acc() with os.walk() |
| Mirror local folder to ACC | Compare file names + sizes before uploading |
What SKILL.md sets; muted values are Claude Code's defaults
25 skills in this plugin
/acc-api-setupSet up Python authentication and a reusable client for the Autodesk Platform Services (APS) API to access Autodesk Construction Cloud (ACC). Use this skill first before any other ACC API script — it handles OAuth2 token acquisition (2-legged and 3-legged), environment configuration, hub/project discovery, and the Python boilerplate that all ACC API scripts depend on. Trigger on phrases like "ACC API setup", "authenticate with APS", "get an APS token", "connect to ACC", "Autodesk API token", "APS credentials", "set up Forge API", "configure ACC API", "get access token Autodesk", or whenever a user is starting to write ACC/APS API scripts and needs the authentication foundation. Always offer this skill before any other ACC API skill if the user hasn't authenticated yet.
/acc-coordinateWork with Autodesk Construction Cloud (ACC) Coordinate — list and inspect model sets, retrieve clash results, create clash issues, manage model activation for coordination, and export coordination reports via the APS Model Coordination API. Use this skill when a user needs to automate clash detection workflows, pull clash data from ACC for reporting, create ACC issues from clashes, check which models are active in a model set, or integrate ACC coordination data with other tools. Trigger on phrases like "ACC Coordinate", "model coordination", "model set", "clash results", "clash data", "ACC clashes", "coordination space", "activated models", "clash issues", "federated model", "coordination report", "BIM coordination", or any request to work with ACC's model coordination module via API. Also offer this when users want to export or report on clash data from ACC.
/acc-design-collaborationGuide Revit ↔ ACC Design Collaboration workflows — setting up cloud worksharing, creating and consuming design packages, shared views, Design Collaboration setup, model publishing, and Revit cloud model best practices. Also covers the API for querying shared views and design package status. Use this skill when a user needs help with Revit cloud models, BIM 360 Design / ACC Design Collaboration, creating or receiving design packages, activating models for coordination, or troubleshooting cloud worksharing issues. Trigger on phrases like "Design Collaboration", "cloud worksharing", "Revit cloud model", "design package", "shared views", "consume package", "publish model to ACC", "BIM 360 Design", "Revit cloud", "cloud model", "collaboration workflow", "ACC Revit workflow", or any request involving the Revit-to-ACC publishing and collaboration pipeline.
/acc-reportsExport ACC project data to CSV or Excel — issues, RFIs, document logs, clash summaries, transmittals, and project activity reports — using the APS REST API with Python. Use this skill when a user needs to report on ACC project health, export an issues register, pull RFI status into a spreadsheet, generate a document transmittal log, create a clash trend report, or produce any data export from Autodesk Construction Cloud. Trigger on phrases like "export issues", "issues report", "RFI report", "ACC report", "export from ACC", "document log", "clash report", "ACC data export", "project status report", "pull data from ACC", "ACC Excel export", "transmittal log", or any request to extract or report on data stored in Autodesk Construction Cloud.
/analyze-roomsAnalyze rooms, spaces, and areas in a Revit model — GIA calculations, space program comparison, department breakdowns, unbounded/unplaced room audits, and CSV export. Use this skill when a user wants to calculate total floor area, check room areas against a brief, export a room data table, find unplaced or unbounded rooms, or produce a GIA (Gross Internal Area) report. Trigger on phrases like "room areas", "GIA", "space program", "analyze rooms", "unbounded rooms", "area schedule", "room data", "floor area summary", "net internal area", or any request involving Revit room/space quantities. Also use when someone mentions area validation before planning submission.
/audit-modelAudit and analyze Revit model health, quality, and BIM standards compliance. Use this skill when checking model file size, warning counts, element counts by category, redundant or in-place families, unused views, workset structure, model warnings, or any model performance or quality-control question. Trigger on phrases like "audit my model", "check model health", "how many warnings", "is my model clean", "model performance", "BIM QC", "quality check", or whenever someone wants a summary of what's in their Revit model. Proactively offer an audit when users mention slow model performance or submission deadlines.
npx claudepluginhub utopia5327/claude-plugin-for-revit-bim --plugin revit-bimOther plugins' skills for the same job