{
  "schemaVersion": "1.0",
  "item": {
    "slug": "employee-skills-importer",
    "name": "employee-skills-importer",
    "source": "tencent",
    "type": "skill",
    "category": "数据分析",
    "sourceUrl": "https://clawhub.ai/inna-demidova/employee-skills-importer",
    "canonicalUrl": "https://clawhub.ai/inna-demidova/employee-skills-importer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/employee-skills-importer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=employee-skills-importer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "EXAMPLE_OUTPUT.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/employee-skills-importer"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/employee-skills-importer",
    "agentPageUrl": "https://openagent3.xyz/skills/employee-skills-importer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/employee-skills-importer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/employee-skills-importer/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Employee Skills Importer",
        "body": "This skill automates the process of importing employee skills from CSV files into a Supabase database. It parses the CSV, checks what already exists in the database, and generates idempotent SQL scripts to insert missing data."
      },
      {
        "title": "Overview",
        "body": "The skill performs a 3-step process:\n\nIdentify and insert missing skill categories - Extract categories from CSV headers, check database, generate INSERT script\nIdentify and insert missing skills - Extract skills with their categories, check database, generate INSERT script\nGenerate employee_skills INSERT script - Map employees by name, link skills, create final INSERT statements"
      },
      {
        "title": "CSV Format Requirements",
        "body": "The CSV must have:\n\nRow 1: Empty or metadata (ignored)\nRow 2: Skill category names spanning multiple columns\nRow 3+: Individual skill names (column headers, may span multiple rows due to line breaks)\nEmployee data rows: Employee data with First Name, Last Name in first two columns, followed by skill experience values\n\nExample structure:\n\n,,,,,,.NET,,,,,Front-end,,,Java,,,\nFirst Name,Last Name,Full Name,Unit,...,C#,ASP.net,MVC,...,JavaScript,HTML,CSS,...,Java,Spring,...\nJohn,Doe,John Doe,Unit 1,...,5,4,3,...,6,6,5,...,0,0,..."
      },
      {
        "title": "Step 1: Skill Categories",
        "body": "Parse row 2 to extract unique category names\nQuery the database to check existing categories:\nSELECT name FROM skill_categories\n\n\nGenerate idempotent INSERT for missing categories:\nINSERT INTO skill_categories (name) \nVALUES ('Category1'), ('Category2'), ('Category3')\nON CONFLICT (name) DO NOTHING;"
      },
      {
        "title": "Step 2: Skills",
        "body": "Parse skill name rows and map to categories from row 2\nQuery database for existing skills:\nSELECT s.name, sc.name as category_name \nFROM skills s \nLEFT JOIN skill_categories sc ON s.category_id = sc.id\n\n\nFor each skill to insert:\n\nFind the category_id using a subquery\nGenerate idempotent INSERT:\n\nINSERT INTO skills (name, category_id)\nVALUES \n  ('C#', (SELECT id FROM skill_categories WHERE name = '.NET')),\n  ('JavaScript', (SELECT id FROM skill_categories WHERE name = 'Front-end'))\nON CONFLICT (name) DO NOTHING;"
      },
      {
        "title": "Step 3: Employee Skills",
        "body": "Parse employee rows (first_name, last_name, skill values)\nQuery employees table to get employee IDs:\nSELECT id, first_name, last_name FROM employees\n\n\nFor each employee, for each skill with non-zero experience:\n\nLook up employee_id by matching first_name + last_name\nLook up skill_id using subquery\nCRITICAL: Use TRIM() in WHERE clause to handle whitespace variations in database\nGenerate INSERT:\n\nINSERT INTO employee_skills (employee_id, skill_id, years_of_experience)\nVALUES \n  (\n    (SELECT id FROM employees WHERE TRIM(first_name) = 'John' AND TRIM(last_name) = 'Doe'),\n    (SELECT id FROM skills WHERE name = 'C#'),\n    5\n  )\nON CONFLICT (employee_id, skill_id) DO UPDATE \nSET years_of_experience = EXCLUDED.years_of_experience;"
      },
      {
        "title": "Database Schema",
        "body": "skill_categories table: id (uuid), name (text, unique)\nskills table: id (uuid), name (text, unique), category_id (uuid FK to skill_categories)\nemployees table: id (uuid), first_name (text), last_name (text)\nemployee_skills table: id (uuid), employee_id (uuid FK), skill_id (uuid FK), years_of_experience (real)"
      },
      {
        "title": "Idempotency",
        "body": "All generated SQL scripts use ON CONFLICT clauses to ensure they can be run multiple times without errors:\n\nFor categories and skills: ON CONFLICT (name) DO NOTHING\nFor employee_skills: ON CONFLICT (employee_id, skill_id) DO UPDATE SET years_of_experience = EXCLUDED.years_of_experience"
      },
      {
        "title": "Data Handling",
        "body": "Skip employees with zero or empty experience values for a skill\nHandle numeric experience values (can be integers or decimals like 0.5, 1.7, etc.)\nClean up skill names by trimming whitespace and removing line breaks\nSkip rows where employee lookup fails (employee not found in database)\nHandle multi-line CSV cells properly\nCRITICAL: Deduplicate employee-skill pairs before generating SQL - Keep the highest years value when duplicates exist\nCRITICAL: Automatically correct employee name spellings - Use fuzzy matching to find and correct minor spelling differences (e.g., \"Victoriia\" → \"Viktoriia\")\nCRITICAL: Trim all employee names - Remove leading/trailing whitespace from all names\nCRITICAL: Use TRIM() in SQL WHERE clauses - Database may have extra spaces (e.g., \"Yurii   Solokha\" with 3 spaces)\nCRITICAL: Skip employees with no match - If no close match found in database, exclude those records and report them"
      },
      {
        "title": "Error Prevention",
        "body": "Always use subqueries for foreign key lookups rather than hardcoding UUIDs\nValidate that category names match between row 2 and skill lookups\nReport any employees from CSV not found in the database\nReport any skills that couldn't be mapped to categories\n\nCRITICAL - Prevent Duplicate Key Violations:\n\nBefore generating the employee_skills INSERT, deduplicate all records by (first_name, last_name, skill)\nWhen duplicates exist, keep the record with the highest years_of_experience value\nThis prevents: ON CONFLICT DO UPDATE command cannot affect row a second time\n\nCRITICAL - Automatic Name Correction:\n\nBefore generating SQL, validate ALL employees exist in the database\nFor employees not found by exact match:\n\nUse fuzzy matching (Levenshtein distance or similar) to find close matches in database\nIf a close match is found (e.g., \"Victoriia\" → \"Viktoriia\"), automatically use the database spelling\nIf no close match is found, skip the employee entirely\n\n\nGenerate a report showing:\n\nEmployees with automatic corrections applied: \"CSV name → Database name\"\nEmployees skipped (no match found): List with number of skills skipped\n\n\nThis prevents: null value in column \"employee_id\" violates not-null constraint"
      },
      {
        "title": "Output Format",
        "body": "The skill produces three SQL scripts plus one report file:\n\n1_insert_categories.sql\n\n-- Insert missing skill categories\nINSERT INTO skill_categories (name) \nVALUES ('.NET'), ('Front-end'), ('Java')\nON CONFLICT (name) DO NOTHING;\n\n2_insert_skills.sql\n\n-- Insert missing skills with category mapping\nINSERT INTO skills (name, category_id)\nVALUES \n  ('C#', (SELECT id FROM skill_categories WHERE name = '.NET')),\n  ('ASP.net', (SELECT id FROM skill_categories WHERE name = '.NET')),\n  ('JavaScript', (SELECT id FROM skill_categories WHERE name = 'Front-end'))\nON CONFLICT (name) DO NOTHING;\n\n3_insert_employee_skills.sql\n\n-- Insert employee skills\n-- Records have been deduplicated and filtered for valid employees only\n-- Using TRIM() in WHERE clause to handle whitespace in database\nINSERT INTO employee_skills (employee_id, skill_id, years_of_experience)\nVALUES \n  (\n    (SELECT id FROM employees WHERE TRIM(first_name) = 'John' AND TRIM(last_name) = 'Doe'),\n    (SELECT id FROM skills WHERE name = 'C#'),\n    5\n  ),\n  (\n    (SELECT id FROM employees WHERE TRIM(first_name) = 'John' AND TRIM(last_name) = 'Doe'),\n    (SELECT id FROM skills WHERE name = 'JavaScript'),\n    6\n  )\nON CONFLICT (employee_id, skill_id) DO UPDATE \nSET years_of_experience = EXCLUDED.years_of_experience;"
      },
      {
        "title": "Execution Steps",
        "body": "When the user provides a CSV file:\n\nParse the CSV structure\n\nRead the file and validate format\nExtract category names from row 2\nExtract skill names from subsequent rows (handling multi-line cells)\nMap each skill to its category based on column positions\n\n\n\nQuery existing data from Supabase\n\nFetch all existing skill_categories\nFetch all existing skills with their categories\nFetch all employees (id, first_name, last_name)\n\n\n\nGenerate Script 1: Categories\n\nCompare CSV categories against database\nCreate INSERT statement for missing categories\nSave to file and present to user\n\n\n\nGenerate Script 2: Skills\n\nCompare CSV skills against database\nFor missing skills, include category lookup subquery\nCreate INSERT statement\nSave to file and present to user\n\n\n\nGenerate Script 3: Employee Skills\n\nParse employee rows\nVALIDATE: Compare all CSV employees against database using exact matching\nFUZZY MATCH: For non-exact matches, find closest database employee using similarity algorithm\n\nCalculate similarity score for first_name and last_name separately\nIf combined similarity is above threshold (e.g., 85%), automatically use database name\nTrack all automatic corrections for reporting\n\n\nCORRECT: Replace CSV names with database names for matched employees\nFILTER: Skip employees with no close match found\nDEDUPLICATE: Remove duplicates by (employee, skill), keeping highest years value\nGenerate INSERT statements using corrected employee names\nGenerate report showing corrections and skipped employees\nSave SQL file and report to outputs directory\nPresent both files to user\n\n\n\nPresent all files to the user\n\nThree SQL scripts (1_insert_categories.sql, 2_insert_skills.sql, 3_insert_employee_skills.sql)\nOne report file (skipped_employees_report.txt) if any employees were skipped\nUser can execute SQL scripts in order: 1 → 2 → 3\nUser should review report to fix name mismatches if needed"
      },
      {
        "title": "Usage Example",
        "body": "User uploads CSV file and says:\n\"Parse this employee skills CSV and generate SQL insert scripts\"\n\nSkill responds:\n\nAnalyzes the CSV structure\nConnects to Supabase SkillsSystem project\nChecks existing data in all three tables\nGenerates three SQL files\nReports summary (e.g., \"Found 5 new categories, 23 new skills, generating inserts for 47 employees\")\nPresents the three SQL files for download"
      },
      {
        "title": "Project Configuration",
        "body": "This skill is configured to work with the Supabase project:\n\nProject Name: SkillsSystem\nProject ID: ypibfhbklinkvybgotef\nRegion: eu-central-1\n\nThe skill automatically connects to this project when executing queries."
      },
      {
        "title": "Error 1: \"ON CONFLICT DO UPDATE command cannot affect row a second time\"",
        "body": "Cause: Duplicate employee-skill pairs in the generated INSERT statement\nSolution: The skill now deduplicates all records before generating SQL. If you see this error, it means deduplication was not performed.\nPrevention: Always deduplicate by (first_name, last_name, skill) and keep the highest years value"
      },
      {
        "title": "Error 2: \"null value in column 'employee_id' violates not-null constraint\"",
        "body": "Cause: Employee from CSV not found in database (usually due to name spelling differences or whitespace issues)\nSolution: The skill now:\n\nAutomatically corrects spelling differences using fuzzy matching\nTrims all whitespace from names\nUses TRIM() in SQL WHERE clauses to match database records with extra spaces\n\nCommon issues:\n\nSpelling variations: \"Victoriia\"↔\"Viktoriia\", \"Karasyov\"↔\"Karasov\"\nExtra whitespace in database: \"Yurii   Solokha\" (3 spaces)\nLeading/trailing spaces\n\nHow it works:\n\nCompares CSV names against database using similarity algorithm\nIf close match found (>83% similarity), automatically uses database spelling\nTrims all names before comparison\nUses TRIM(first_name) and TRIM(last_name) in SQL to handle database whitespace\nIf no close match found, skips the employee and reports it\n\nResult: This error should no longer occur as names are automatically corrected and whitespace is handled"
      },
      {
        "title": "Name Matching Algorithm",
        "body": "The skill uses the following approach:\n\nTry exact match first (first_name AND last_name)\nIf no exact match, calculate similarity score using:\n\nLevenshtein distance or similar algorithm\nHandles common variations: \"Victoriia\"↔\"Viktoriia\", \"Karasyov\"↔\"Karasov\"\n\n\nIf similarity > 83% threshold, accept as match\nIf multiple close matches found, pick the closest one\nIf no close match, skip the employee\nAlways trim whitespace from both CSV and database names\nUse TRIM() in SQL queries to match records with extra spaces in database"
      }
    ],
    "body": "Employee Skills Importer\n\nThis skill automates the process of importing employee skills from CSV files into a Supabase database. It parses the CSV, checks what already exists in the database, and generates idempotent SQL scripts to insert missing data.\n\nOverview\n\nThe skill performs a 3-step process:\n\nIdentify and insert missing skill categories - Extract categories from CSV headers, check database, generate INSERT script\nIdentify and insert missing skills - Extract skills with their categories, check database, generate INSERT script\nGenerate employee_skills INSERT script - Map employees by name, link skills, create final INSERT statements\nCSV Format Requirements\n\nThe CSV must have:\n\nRow 1: Empty or metadata (ignored)\nRow 2: Skill category names spanning multiple columns\nRow 3+: Individual skill names (column headers, may span multiple rows due to line breaks)\nEmployee data rows: Employee data with First Name, Last Name in first two columns, followed by skill experience values\n\nExample structure:\n\n,,,,,,.NET,,,,,Front-end,,,Java,,,\nFirst Name,Last Name,Full Name,Unit,...,C#,ASP.net,MVC,...,JavaScript,HTML,CSS,...,Java,Spring,...\nJohn,Doe,John Doe,Unit 1,...,5,4,3,...,6,6,5,...,0,0,...\n\nWorkflow\nStep 1: Skill Categories\nParse row 2 to extract unique category names\nQuery the database to check existing categories:\nSELECT name FROM skill_categories\n\nGenerate idempotent INSERT for missing categories:\nINSERT INTO skill_categories (name) \nVALUES ('Category1'), ('Category2'), ('Category3')\nON CONFLICT (name) DO NOTHING;\n\nStep 2: Skills\nParse skill name rows and map to categories from row 2\nQuery database for existing skills:\nSELECT s.name, sc.name as category_name \nFROM skills s \nLEFT JOIN skill_categories sc ON s.category_id = sc.id\n\nFor each skill to insert:\nFind the category_id using a subquery\nGenerate idempotent INSERT:\nINSERT INTO skills (name, category_id)\nVALUES \n  ('C#', (SELECT id FROM skill_categories WHERE name = '.NET')),\n  ('JavaScript', (SELECT id FROM skill_categories WHERE name = 'Front-end'))\nON CONFLICT (name) DO NOTHING;\n\nStep 3: Employee Skills\nParse employee rows (first_name, last_name, skill values)\nQuery employees table to get employee IDs:\nSELECT id, first_name, last_name FROM employees\n\nFor each employee, for each skill with non-zero experience:\nLook up employee_id by matching first_name + last_name\nLook up skill_id using subquery\nCRITICAL: Use TRIM() in WHERE clause to handle whitespace variations in database\nGenerate INSERT:\nINSERT INTO employee_skills (employee_id, skill_id, years_of_experience)\nVALUES \n  (\n    (SELECT id FROM employees WHERE TRIM(first_name) = 'John' AND TRIM(last_name) = 'Doe'),\n    (SELECT id FROM skills WHERE name = 'C#'),\n    5\n  )\nON CONFLICT (employee_id, skill_id) DO UPDATE \nSET years_of_experience = EXCLUDED.years_of_experience;\n\nImportant Notes\nDatabase Schema\nskill_categories table: id (uuid), name (text, unique)\nskills table: id (uuid), name (text, unique), category_id (uuid FK to skill_categories)\nemployees table: id (uuid), first_name (text), last_name (text)\nemployee_skills table: id (uuid), employee_id (uuid FK), skill_id (uuid FK), years_of_experience (real)\nIdempotency\n\nAll generated SQL scripts use ON CONFLICT clauses to ensure they can be run multiple times without errors:\n\nFor categories and skills: ON CONFLICT (name) DO NOTHING\nFor employee_skills: ON CONFLICT (employee_id, skill_id) DO UPDATE SET years_of_experience = EXCLUDED.years_of_experience\nData Handling\nSkip employees with zero or empty experience values for a skill\nHandle numeric experience values (can be integers or decimals like 0.5, 1.7, etc.)\nClean up skill names by trimming whitespace and removing line breaks\nSkip rows where employee lookup fails (employee not found in database)\nHandle multi-line CSV cells properly\nCRITICAL: Deduplicate employee-skill pairs before generating SQL - Keep the highest years value when duplicates exist\nCRITICAL: Automatically correct employee name spellings - Use fuzzy matching to find and correct minor spelling differences (e.g., \"Victoriia\" → \"Viktoriia\")\nCRITICAL: Trim all employee names - Remove leading/trailing whitespace from all names\nCRITICAL: Use TRIM() in SQL WHERE clauses - Database may have extra spaces (e.g., \"Yurii Solokha\" with 3 spaces)\nCRITICAL: Skip employees with no match - If no close match found in database, exclude those records and report them\nError Prevention\nAlways use subqueries for foreign key lookups rather than hardcoding UUIDs\nValidate that category names match between row 2 and skill lookups\nReport any employees from CSV not found in the database\nReport any skills that couldn't be mapped to categories\n\nCRITICAL - Prevent Duplicate Key Violations:\n\nBefore generating the employee_skills INSERT, deduplicate all records by (first_name, last_name, skill)\nWhen duplicates exist, keep the record with the highest years_of_experience value\nThis prevents: ON CONFLICT DO UPDATE command cannot affect row a second time\n\nCRITICAL - Automatic Name Correction:\n\nBefore generating SQL, validate ALL employees exist in the database\nFor employees not found by exact match:\nUse fuzzy matching (Levenshtein distance or similar) to find close matches in database\nIf a close match is found (e.g., \"Victoriia\" → \"Viktoriia\"), automatically use the database spelling\nIf no close match is found, skip the employee entirely\nGenerate a report showing:\nEmployees with automatic corrections applied: \"CSV name → Database name\"\nEmployees skipped (no match found): List with number of skills skipped\nThis prevents: null value in column \"employee_id\" violates not-null constraint\nOutput Format\n\nThe skill produces three SQL scripts plus one report file:\n\n1_insert_categories.sql\n\n-- Insert missing skill categories\nINSERT INTO skill_categories (name) \nVALUES ('.NET'), ('Front-end'), ('Java')\nON CONFLICT (name) DO NOTHING;\n\n\n2_insert_skills.sql\n\n-- Insert missing skills with category mapping\nINSERT INTO skills (name, category_id)\nVALUES \n  ('C#', (SELECT id FROM skill_categories WHERE name = '.NET')),\n  ('ASP.net', (SELECT id FROM skill_categories WHERE name = '.NET')),\n  ('JavaScript', (SELECT id FROM skill_categories WHERE name = 'Front-end'))\nON CONFLICT (name) DO NOTHING;\n\n\n3_insert_employee_skills.sql\n\n-- Insert employee skills\n-- Records have been deduplicated and filtered for valid employees only\n-- Using TRIM() in WHERE clause to handle whitespace in database\nINSERT INTO employee_skills (employee_id, skill_id, years_of_experience)\nVALUES \n  (\n    (SELECT id FROM employees WHERE TRIM(first_name) = 'John' AND TRIM(last_name) = 'Doe'),\n    (SELECT id FROM skills WHERE name = 'C#'),\n    5\n  ),\n  (\n    (SELECT id FROM employees WHERE TRIM(first_name) = 'John' AND TRIM(last_name) = 'Doe'),\n    (SELECT id FROM skills WHERE name = 'JavaScript'),\n    6\n  )\nON CONFLICT (employee_id, skill_id) DO UPDATE \nSET years_of_experience = EXCLUDED.years_of_experience;\n\nExecution Steps\n\nWhen the user provides a CSV file:\n\nParse the CSV structure\n\nRead the file and validate format\nExtract category names from row 2\nExtract skill names from subsequent rows (handling multi-line cells)\nMap each skill to its category based on column positions\n\nQuery existing data from Supabase\n\nFetch all existing skill_categories\nFetch all existing skills with their categories\nFetch all employees (id, first_name, last_name)\n\nGenerate Script 1: Categories\n\nCompare CSV categories against database\nCreate INSERT statement for missing categories\nSave to file and present to user\n\nGenerate Script 2: Skills\n\nCompare CSV skills against database\nFor missing skills, include category lookup subquery\nCreate INSERT statement\nSave to file and present to user\n\nGenerate Script 3: Employee Skills\n\nParse employee rows\nVALIDATE: Compare all CSV employees against database using exact matching\nFUZZY MATCH: For non-exact matches, find closest database employee using similarity algorithm\nCalculate similarity score for first_name and last_name separately\nIf combined similarity is above threshold (e.g., 85%), automatically use database name\nTrack all automatic corrections for reporting\nCORRECT: Replace CSV names with database names for matched employees\nFILTER: Skip employees with no close match found\nDEDUPLICATE: Remove duplicates by (employee, skill), keeping highest years value\nGenerate INSERT statements using corrected employee names\nGenerate report showing corrections and skipped employees\nSave SQL file and report to outputs directory\nPresent both files to user\n\nPresent all files to the user\n\nThree SQL scripts (1_insert_categories.sql, 2_insert_skills.sql, 3_insert_employee_skills.sql)\nOne report file (skipped_employees_report.txt) if any employees were skipped\nUser can execute SQL scripts in order: 1 → 2 → 3\nUser should review report to fix name mismatches if needed\nUsage Example\n\nUser uploads CSV file and says: \"Parse this employee skills CSV and generate SQL insert scripts\"\n\nSkill responds:\n\nAnalyzes the CSV structure\nConnects to Supabase SkillsSystem project\nChecks existing data in all three tables\nGenerates three SQL files\nReports summary (e.g., \"Found 5 new categories, 23 new skills, generating inserts for 47 employees\")\nPresents the three SQL files for download\nProject Configuration\n\nThis skill is configured to work with the Supabase project:\n\nProject Name: SkillsSystem\nProject ID: ypibfhbklinkvybgotef\nRegion: eu-central-1\n\nThe skill automatically connects to this project when executing queries.\n\nCommon Errors and Solutions\nError 1: \"ON CONFLICT DO UPDATE command cannot affect row a second time\"\n\nCause: Duplicate employee-skill pairs in the generated INSERT statement Solution: The skill now deduplicates all records before generating SQL. If you see this error, it means deduplication was not performed. Prevention: Always deduplicate by (first_name, last_name, skill) and keep the highest years value\n\nError 2: \"null value in column 'employee_id' violates not-null constraint\"\n\nCause: Employee from CSV not found in database (usually due to name spelling differences or whitespace issues) Solution: The skill now:\n\nAutomatically corrects spelling differences using fuzzy matching\nTrims all whitespace from names\nUses TRIM() in SQL WHERE clauses to match database records with extra spaces\n\nCommon issues:\n\nSpelling variations: \"Victoriia\"↔\"Viktoriia\", \"Karasyov\"↔\"Karasov\"\nExtra whitespace in database: \"Yurii Solokha\" (3 spaces)\nLeading/trailing spaces\n\nHow it works:\n\nCompares CSV names against database using similarity algorithm\nIf close match found (>83% similarity), automatically uses database spelling\nTrims all names before comparison\nUses TRIM(first_name) and TRIM(last_name) in SQL to handle database whitespace\nIf no close match found, skips the employee and reports it\n\nResult: This error should no longer occur as names are automatically corrected and whitespace is handled\n\nName Matching Algorithm\n\nThe skill uses the following approach:\n\nTry exact match first (first_name AND last_name)\nIf no exact match, calculate similarity score using:\nLevenshtein distance or similar algorithm\nHandles common variations: \"Victoriia\"↔\"Viktoriia\", \"Karasyov\"↔\"Karasov\"\nIf similarity > 83% threshold, accept as match\nIf multiple close matches found, pick the closest one\nIf no close match, skip the employee\nAlways trim whitespace from both CSV and database names\nUse TRIM() in SQL queries to match records with extra spaces in database"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/inna-demidova/employee-skills-importer",
    "publisherUrl": "https://clawhub.ai/inna-demidova/employee-skills-importer",
    "owner": "inna-demidova",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/employee-skills-importer",
    "downloadUrl": "https://openagent3.xyz/downloads/employee-skills-importer",
    "agentUrl": "https://openagent3.xyz/skills/employee-skills-importer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/employee-skills-importer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/employee-skills-importer/agent.md"
  }
}