Skip to content

heymegabyte/agent-skills / skills/bitwarden

bitwarden

Verified

Bitwarden Public API skill — auto-forged from OpenAPI 1.0.0. Bitwarden Public API for Organizations — manage members, collections, groups, events, and policies.

FileKindSize
SKILL.mdskill md5.9 KB
client.tsscript6.3 KB
types.tsscript3.8 KB
// Auto-generated by forge-skill-from-openapi
// API: bitwarden
// DO NOT EDIT — re-run forge to regenerate

import type * as T from './types.js';

function appendQuery(url: string, query?: Record<string, string>): string {
  if (!query || Object.keys(query).length === 0) return url;
  const qs = new URLSearchParams(query).toString();
  return url.includes('?') ? `${url}&${qs}` : `${url}?${qs}`;
}

export class BitwardenClient {
  constructor(
    private readonly apiToken: string,
    private readonly baseUrl: string = 'https://api.bitwarden.com/public',
  ) {}

  private async request<T>(method: string, url: string, body?: string): Promise<T> {
    const res = await fetch(url, {
      method,
      headers: {
        'Authorization': `Bearer ${this.apiToken}`,
        'Content-Type': 'application/json',
        'Accept': 'application/json',
      },
      body,
    });
    if (!res.ok) {
      const text = await res.text().catch(() => '');
      throw new Error(`${method} ${url} → ${res.status}: ${text}`);
    }
    if (res.status === 204) return undefined as T;
    return res.json() as T;
  }

  async list_items(): Promise<list_itemsResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/ciphers`);
  },

  async get_item(id: string): Promise<get_itemResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/ciphers/${id}`);
  },

  async edit_item(id: string, body?: edit_itemBody): Promise<edit_itemResponse> {
    return this.request('PUT', `https://api.bitwarden.com/public/ciphers/${id}`, body ? JSON.stringify(body) : undefined);
  },

  async delete_item(id: string): Promise<delete_itemResponse> {
    return this.request('DELETE', `https://api.bitwarden.com/public/ciphers/${id}`);
  },

  async create_item(body?: create_itemBody): Promise<create_itemResponse> {
    return this.request('POST', `https://api.bitwarden.com/public/ciphers/create`, body ? JSON.stringify(body) : undefined);
  },

  async list_org_collections(): Promise<list_org_collectionsResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/collections`);
  },

  async create_org_collection(body?: create_org_collectionBody): Promise<create_org_collectionResponse> {
    return this.request('POST', `https://api.bitwarden.com/public/collections`, body ? JSON.stringify(body) : undefined);
  },

  async get_org_collection(id: string): Promise<get_org_collectionResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/collections/${id}`);
  },

  async edit_org_collection(id: string, body?: edit_org_collectionBody): Promise<edit_org_collectionResponse> {
    return this.request('PUT', `https://api.bitwarden.com/public/collections/${id}`, body ? JSON.stringify(body) : undefined);
  },

  async delete_org_collection(id: string): Promise<delete_org_collectionResponse> {
    return this.request('DELETE', `https://api.bitwarden.com/public/collections/${id}`);
  },

  async list_org_members(): Promise<list_org_membersResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/members`);
  },

  async invite_org_member(body?: invite_org_memberBody): Promise<invite_org_memberResponse> {
    return this.request('POST', `https://api.bitwarden.com/public/members`, body ? JSON.stringify(body) : undefined);
  },

  async get_org_member(id: string): Promise<get_org_memberResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/members/${id}`);
  },

  async update_org_member(id: string, body?: update_org_memberBody): Promise<update_org_memberResponse> {
    return this.request('PUT', `https://api.bitwarden.com/public/members/${id}`, body ? JSON.stringify(body) : undefined);
  },

  async remove_org_member(id: string): Promise<remove_org_memberResponse> {
    return this.request('DELETE', `https://api.bitwarden.com/public/members/${id}`);
  },

  async reinvite_org_member(id: string, body?: Record<string, unknown>): Promise<reinvite_org_memberResponse> {
    return this.request('POST', `https://api.bitwarden.com/public/members/${id}/reinvite`, body ? JSON.stringify(body) : undefined);
  },

  async confirm_org_member(id: string, body?: confirm_org_memberBody): Promise<confirm_org_memberResponse> {
    return this.request('POST', `https://api.bitwarden.com/public/members/${id}/confirm`, body ? JSON.stringify(body) : undefined);
  },

  async list_org_groups(): Promise<list_org_groupsResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/groups`);
  },

  async create_org_group(body?: create_org_groupBody): Promise<create_org_groupResponse> {
    return this.request('POST', `https://api.bitwarden.com/public/groups`, body ? JSON.stringify(body) : undefined);
  },

  async get_org_group(id: string): Promise<get_org_groupResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/groups/${id}`);
  },

  async update_org_group(id: string, body?: update_org_groupBody): Promise<update_org_groupResponse> {
    return this.request('PUT', `https://api.bitwarden.com/public/groups/${id}`, body ? JSON.stringify(body) : undefined);
  },

  async delete_org_group(id: string): Promise<delete_org_groupResponse> {
    return this.request('DELETE', `https://api.bitwarden.com/public/groups/${id}`);
  },

  async get_org_group_member_ids(id: string): Promise<get_org_group_member_idsResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/groups/${id}/member-ids`);
  },

  async update_org_group_members(id: string, body?: update_org_group_membersBody): Promise<update_org_group_membersResponse> {
    return this.request('PUT', `https://api.bitwarden.com/public/groups/${id}/member-ids`, body ? JSON.stringify(body) : undefined);
  },

  async get_org_events(query?: Record<string, string>): Promise<get_org_eventsResponse> {
    return this.request('GET', appendQuery(`https://api.bitwarden.com/public/events`, query));
  },

  async list_org_policies(): Promise<list_org_policiesResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/policies`);
  },

  async get_org_policy(type: string): Promise<get_org_policyResponse> {
    return this.request('GET', `https://api.bitwarden.com/public/policies/${type}`);
  },

  async update_org_policy(type: string, body?: update_org_policyBody): Promise<update_org_policyResponse> {
    return this.request('PUT', `https://api.bitwarden.com/public/policies/${type}`, body ? JSON.stringify(body) : undefined);
  },

}
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall