nimbus-backend
БесплатноБез исполняемых скриптовНе проверенUse when writing or modifying Python code in the Girder backend plugin (devops/girder/plugins/AnnotationPlugin/), creating REST API endpoints, writing…
от arjunrajlaboratory★ 22 звезды на GitHubОб этом скилле
Nimbus Backend Development (Girder)
Access Control
Access Levels (Document-Level)
| Value | Constant | Meaning |
|---|---|---|
| -1 | (none) | No access / Remove access |
| 0 | AccessType.READ |
View-only access |
| 1 | AccessType.WRITE |
Edit access |
| 2 | AccessType.ADMIN |
Owner — can manage access (share, set public, delete) |
Important: AccessType.ADMIN means owner of that document, not a site-wide admin. The creator of a project/dataset gets ADMIN on it and can share it with others.
Removing access: the share endpoints take -1 on the wire, but Girder's setUserAccess(doc, user, level) deletes the entry only when level is None. Pass -1 and Girder stores an inert {id, level: -1} entry: the user can't read anything, yet still shows up in access lists. Convert at the API boundary with parseShareAccessType() (server/helpers/access_helpers.py). A test that checks only "user can no longer read" passes with the bug present, so assert the user has no entry in doc['access']['users'].
Access Decorators (Endpoint-Level)
from girder.api import access
@access.public # Anyone can access
@access.user # Requires authenticated user
@access.admin # Requires site-wide Girder admin (NOT document owner)
Note: @access.admin (decorator) and AccessType.ADMIN (document level) are different. The decorator requires site-wide admin; the access level means document owner.
Model-Level Access
from girder.constants import AccessType
doc = Model().load(id, user=user, level=AccessType.WRITE, exc=True)
doc = Model().load(id, force=True) # Admin bypass
For detailed access patterns including sharing: read references/access-control-patterns.md
When modifying sharing/access code: read codebaseDocumentation/SHARING.md
An optional dataset filter is an optional access check
List endpoints that check READ on the datasetId they filter by must require
it, and must parse it unconditionally. annotation_property_values find
checked access only if "datasetId" in params, so omitting it dropped both
the filter and the check. annotation_connection find required the parameter
but checked only when it was truthy, so datasetId= did the same. Either way
an anonymous caller could list every dataset's values or connections. Parse
with requireObjectId(params.get(...)) (missing or empty → 400), then
Folder().load(..., exc=True), then build the query from that id. Test
anonymously, against a private dataset, with whichever input bypassed the
check: missing for property values (testFindPropertyValuesRequiresDatasetId),
empty for connections (testFindConnectionsWithEmptyDatasetIdDenied).
Ids that match nothing get no access check
Bulk endpoints usually check access on the datasets of the documents an id list resolves to (distinctDatasetIds → requireDatasetsAccess). An id that matches no document resolves to no dataset, so nothing about it is checked. That is harmless only if nothing downstream acts on the raw id. The bulk-delete cleanup cascade did: it removed connections and property values pointing at the id in any dataset. Leftover orphans in other users' datasets could therefore be deleted by naming their dangling ids. Anything that fans out from caller-supplied ids (cascades, events, follow-up queries keyed on the id rather than the loaded document) must run only for ids that resolved to a document the caller was checked against. Annotation.multipleAnnotationsRemovedEvent filters to existing annotations before triggering cleanup (#1418, Codex P2).
Never return a document that carries access raw
findWithPermissions and @loadmodel decide which documents a caller sees. Neither decides which fields they see. Any plugin model built on AccessControlledModel (every ProxiedModel) stores an access ACL that lists every collaborator's user id, and GET user/{id} turns those ids into names. When a model defines no exposeFields, returning its raw doc hands that list to every reader, anonymous viewers of public datasets included. This has happened with dataset views, properties, worker interfaces and previews, and with the JSON export and Zenodo archive, which embed docs without going through any endpoint.
- Give the model
CLIENT_FIELDSandexposeFields(level=READ, fields=("_id",) + CLIENT_FIELDS)ininitialize(), and put@filtermodel(model=...)on every endpoint that returns its docs (get, find/list, create, update). - For exports, which bypass
filter(), use afields=projection (AnnotationProperty.findClientFields). - Treat the write side as the twin: a create or update that stores the raw body lets the caller set
accessorpublic. Allow-list the body withfilterUpdateFields(requireObjectBody(...)). filter()adds_accessLevel, computed from the doc's own ACL. If that ACL is not what grants reads (properties are read throu
Установить nimbus-backend в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nimbus-backend?
Use when writing or modifying Python code in the Girder backend plugin (devops/girder/plugins/AnnotationPlugin/), creating REST API endpoints, writing database queries with MongoDB, implementing access control and sharing, running backend tests with tox/pytest, or debugging Docker compose services. Covers: API vs model layer separation (API raises RestException, models raise ValueError — never mix these), API endpoint patterns (@autoDescribeRoute, modelParam), access control (AccessType, setUserAccess, setPublic, permission escalation risks), database queries (Model.find not collection.find, batch $in queries not loops), model loading (exc=True not manual null checks), error handling (catch specific exceptions, never except Exception), public endpoint input validation (inline isinstance guards → RestException 400, MAX_* clamps, bson InvalidId → 400), loading plugin changes into the running container (rebuild, not restart), and backend test patterns. Use this skill even for small backend changes.
Как установить скилл nimbus-backend?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nimbus-backend запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic