Skip to content

Mahmoud-Qandeel/GetJobIQ / 01-FRAMEWORK/.agents/skills/jobindex-search

jobindex-search

Verified

Make sure to use this skill whenever the user wants to search for jobs in Denmark, find Danish job listings, look up a specific job posting, or asks anything about the Danish job market — even if they don't mention jobindex.dk explicitly. Invoke this skill for questions about open positions, job vacancies, hiring in Denmark, job opportunities in Danish cities or sectors, or when the user wants to find work in Denmark. Also trigger for phrases like "find me a job", "are there any jobs for X in Copenhagen", or "what jobs are available in Aarhus" when the context is Denmark. Trigger phrases include: jobindex, jobsøgning, job i Danmark, ledige stillinger, job opslag, find job, stillingopslag, jobannonce, job vacancy denmark, danish jobs, jobs in denmark, job search denmark, work in denmark, find work denmark, IT jobs denmark, engineer jobs denmark, developer jobs copenhagen, marketing jobs aarhus, jobs aarhus, jobs copenhagen, jobs odense, jobs aalborg, job openings denmark, hiring denmark, job listings denmark, python jobs denmark, grafisk designer job, data engineer job, softwareudvikler job, full stack developer job danmark.

cli/tests/search-page.test.ts

View on GitHub
import { describe, expect, test } from "bun:test";
import { parseSearchPage } from "../src/helpers";

// parseSearchPage had no tests at all: mutating total to stop using
// sr.hitcount survived the whole suite (review finding F35, 2026-08-19).
// The fixture mirrors the real Stash nesting documented in helpers.ts:
// jobsearch/result_app -> storeData -> searchResponse -> { hitcount, results[] }.
function stashPage(searchResponse: object): string {
  const stash = { jobsearch: { result_app: { storeData: { searchResponse } } } };
  return `<html><head><script>var Stash = ${JSON.stringify(stash)};</script></head></html>`;
}

const RESULT = {
  tid: "h1689961",
  headline: "Softwareudvikler",
  company: { name: "Acme A/S", homeurl: "https://acme.example" },
  area: "Aarhus",
  firstdate: "2026-08-10",
  apply_deadline: "2026-09-11T00:00:00",
};

describe("parseSearchPage", () => {
  test("total comes from hitcount, not the page's result count", () => {
    const page = stashPage({ hitcount: 435, results: [RESULT] });
    const parsed = parseSearchPage(page);
    expect(parsed.total).toBe(435);
    expect(parsed.results).toHaveLength(1);
  });

  test("total falls back to the result count when hitcount is absent", () => {
    const page = stashPage({ results: [RESULT, { ...RESULT, tid: "h2" }] });
    expect(parseSearchPage(page).total).toBe(2);
  });

  test("maps the contract fields from a Stash result", () => {
    const [job] = parseSearchPage(stashPage({ hitcount: 1, results: [RESULT] })).results;
    expect(job).toMatchObject({
      id: "h1689961",
      title: "Softwareudvikler",
      company: "Acme A/S",
      location: "Aarhus",
      date: "2026-08-10",
      deadline: "2026-09-11",
      url: "https://www.jobindex.dk/jobannonce/h1689961",
    });
  });

  test("maps an ASAP posting's deadline to null (no stated deadline)", () => {
    // apply_deadline_asap means "no fixed deadline, apply now". The /scrape
    // schema defines null as exactly that, and every consumer (rank's expiry
    // sweep, notion-sync's typed date column) does date arithmetic on this
    // field - a bare "ASAP" string broke all of them on half of live results
    // (review finding F12, 2026-08-19). lastdate present too: the flag wins.
    const [job] = parseSearchPage(
      stashPage({
        hitcount: 1,
        results: [{ ...RESULT, apply_deadline: undefined, apply_deadline_asap: true, lastdate: "2026-09-30" }],
      }),
    ).results;
    expect(job.deadline).toBeNull();
  });

  test("falls back to lastdate when apply_deadline is absent", () => {
    const [job] = parseSearchPage(
      stashPage({ hitcount: 1, results: [{ ...RESULT, apply_deadline: undefined, lastdate: "2026-09-30" }] }),
    ).results;
    expect(job.deadline).toBe("2026-09-30");
  });
});
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 323kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall