Skip to content

steamworks-js

This skill owns the shared setup for every steamworks-* skill. It does not carry the operation steps itself: once setup passes, load the sub-skill for the job.

  • Confirm the Node version the project uses (node -v) and that a steamworks.js package is in its dependencies. Read the installed typings (client.d.ts) before using any call; the surface differs between builds, so do not assume a function exists because another build has it.
  • Install the binding globally: npm i -g @hagicode/steamworks.js@0.1.4 (0.1.4 or later for Workshop screenshots; 0.1.5 or later to remove them). Item fields (metadata, key-value tags, content descriptors, videos), createItem with a file type, app dependencies and the user actions (votes, favorites, playtime) are newer than the 0.1.5 release: install the dev dist-tag or the release that follows 0.1.5, and confirm each function exists in the installed client.d.ts before use. The shared scripts use STEAMWORKS_JS when it is set (a package folder containing index.js), otherwise the global install, and print the version they loaded. If the npm mirror in use lags the registry, add --registry=https://registry.npmjs.org/.
  • Confirm the Steam desktop client is running and logged in to the account that will act. Steam calls fail without it.
  • Confirm the AppID the code will use. Write operations must use the real AppID of the game or tool that owns the Workshop items. Never use a placeholder or a guessed value.
  • Initialize once per process with init(appId?). If the app was launched outside Steam, restartAppIfNecessary(appId) tells you to relaunch through Steam.
  • init() starts the callback pump itself (a 30 Hz timer in the checked build), so async results and progress events arrive without a manual loop. Do not add runCallbacks() calls; check the installed build’s index.js if in doubt.
  • Call shutdown() when the process exits; it stops that timer.
  • Promises reject with the Steam error. Show the message and the call that failed.
  • Do not retry a write (create, update, subscribe, download) automatically. Read the item’s state first, then decide with the user. A failed upload after an item was created keeps that item’s id: the next attempt updates that id, and must never create a second item.
Job Sub-skill Impact
Lists, search, tags, item details, user lists, paging steamworks-workshop-query Read-only
Create an item, first upload of content and preview, set title/description/tags/visibility; shared workshop.py and per-item workshop/ layout steamworks-workshop-publish Submits remote content
Change an existing item, change note, upload progress and result check steamworks-workshop-update Submits remote content
Required items (dependencies) between Workshop items: read the links (returnChildren), add or remove them (addDependency, removeDependency) steamworks-workshop-update Submits remote content: changes what subscribers of the item install
App dependencies of an item (addAppDependency, removeAppDependency, getAppDependencies); metadata, key-value tags, content descriptors and videos on an item (updateItem fields) steamworks-workshop-update Submits remote content
Read an item’s app dependencies (getAppDependencies) or the user’s vote (getUserItemVote) steamworks-workshop-query Read-only
Subscribe, unsubscribe, download, install location, item state; the user’s votes, favorites and playtime tracking steamworks-workshop-client-state Changes account subscriptions, votes, favorites or local files
Report of our published mods per game: one row per mod with subscriptions and favorites, change against the previous saved day in the user’s cache directory steamworks-workshop-stats Read-only for Steam; writes its own daily cache files

Other Steamworks modules (cloud, stats/achievements, identity/social, overlay/input) are planned as later phases and have no skill yet. Do not improvise them from this skill.

Two SDK areas are deliberately not wrapped: remote_storage publish and screenshot tagging. The decision and its reasons are in the README section “Not in scope: remote_storage publish and screenshots tagging”. Do not add calls for them without reopening that decision.

  • Read-only: queries, state, installInfo, downloadInfo, getSubscribedItems. Run freely.
  • Account or local state: subscribe, unsubscribe, download, setUserItemVote, addItemToFavorites, removeItemFromFavorites, startPlaytimeTracking, stopPlaytimeTracking. Show the target publishedFileId and the expected effect, then wait for the user’s go-ahead.
  • Remote submission: createItem (with an optional fileType), updateItem (including its metadata, key-value tag, content descriptor and video fields), updateItemWithCallback, addAppDependency, removeAppDependency. Before calling, state the AppID, the publishedFileId (or that a new item will be created), the content path, and the preview path. Steam documents that a submitted update cannot be cancelled, so get explicit confirmation of the exact content. Removing screenshots is also an updateItem, with removeAdditionalPreviewIndexes (0.1.5 or later): 0-based indexes into additionalPreviews as read just before the call. Confirm the item and the file names first; the shared scripts do this through workshop.py images remove.
  • Destructive: deleteItem appears in the typings but has no phase-1 skill. Do not call it without a per-item confirmation from the user that names the id.
  • Verify the outcome with a read (getItem, state) after every write, and report the evidence, not the expectation.
  • Never print or commit Steam credentials, Web API keys or session tokens.
  • Do not treat publisher administration (Workshop moderation, Publisher Web API keys) as client-side work. It needs a separate server-side process with its own access control.

Turn ideas into shipped software.

HagiCode is an agentic coding workspace. OpenSpec workflows plan the change, multi-agent execution carries it out, and Hero Scenario makes the long run visible, so ideas become shipped software.

Smart
OpenSpec workflows turn intent into a path from proposal to shipped change.
Efficient
Multi-agent execution runs research, build, and review in parallel.
Fun
Rich UI interactions make planning, agent work, and projects easier to follow.