{
  "schemaVersion": "1.0",
  "item": {
    "slug": "struct-offset-analyzer",
    "name": "struct-offset-analyzer",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/LittleEnough/struct-offset-analyzer",
    "canonicalUrl": "https://clawhub.ai/LittleEnough/struct-offset-analyzer",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/struct-offset-analyzer",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=struct-offset-analyzer",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.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-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.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/struct-offset-analyzer"
    },
    "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/struct-offset-analyzer",
    "agentPageUrl": "https://openagent3.xyz/skills/struct-offset-analyzer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/struct-offset-analyzer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/struct-offset-analyzer/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": "struct-offset-analyzer",
        "body": "Statically analyze the memory offsets of C language struct members without needing to run code."
      },
      {
        "title": "Use Cases",
        "body": "Locating struct members during reverse engineering\nConfirming memory layouts during debugging\nAnalyzing data structures in security research\nUnderstanding struct field positions in binary analysis"
      },
      {
        "title": "1. Locate Struct Definition",
        "body": "# Search for struct definition\ngrep -n \"struct xxx_st {\" **/*.h\ngrep -n \"typedef struct\" **/*.h"
      },
      {
        "title": "2. Collect Type Information",
        "body": "Find definitions for all member types:\n\nNested structs\nEnum types\ntypedef aliases\nConstant definitions (e.g., #define EVP_MAX_MD_SIZE 64)"
      },
      {
        "title": "3. Calculate Alignment Rules",
        "body": "TypeSize (64-bit)Alignment Requirementchar/unsigned char11short22int/uint32_t44long/size_t/pointer88unsigned char[N]N1 (no padding needed)enumusually 44structdepends on membersaligned to largest member\n\nKey Rules:\n\nMember offset must be a multiple of its size\nunsigned char arrays are 1-byte aligned, no padding required\nOverall struct size is aligned to the size of its largest member\nPadding bytes count toward offsets"
      },
      {
        "title": "4. Output Offset Table",
        "body": "Use hexadecimal representation for offsets, format:\n\n| Offset(0x) | Member | Type | Size |\n|------------|--------|------|------|\n| 0x00 | field1 | int | 4 |\n| 0x04 | *(padding)* | - | 4 |\n| 0x08 | field2 | void * | 8 |"
      },
      {
        "title": "Common Search Patterns",
        "body": "# Find struct member definition\ngrep -n \"struct xxx_st\" **/*.h\n\n# Find type definition\ngrep -n \"typedef.*XXX\" **/*.h\n\n# Find constant definition\ngrep -n \"#define.*SIZE\" **/*.h\n\n# Find enum definition\ngrep -n \"typedef enum\" **/*.h"
      },
      {
        "title": "Example: OpenSSL ssl_st Analysis",
        "body": "Analyzing client_app_traffic_secret member offset:\n\nLocate struct: ssl/ssl_local.h:1068\nFind constant: EVP_MAX_MD_SIZE = 64 (include/openssl/evp.h:19)\nCalculate layout, note that unsigned char arrays need no padding\nResult: offset 0x33c (828 bytes)"
      },
      {
        "title": "Notes",
        "body": "Confirm target platform (32-bit vs 64-bit)\nNote that conditional compilation (#ifdef) may affect struct layout\nCheck for #pragma pack directives that may change alignment\nUnion members share the same offset"
      }
    ],
    "body": "struct-offset-analyzer\n\nStatically analyze the memory offsets of C language struct members without needing to run code.\n\nUse Cases\nLocating struct members during reverse engineering\nConfirming memory layouts during debugging\nAnalyzing data structures in security research\nUnderstanding struct field positions in binary analysis\nWorkflow\n1. Locate Struct Definition\n# Search for struct definition\ngrep -n \"struct xxx_st {\" **/*.h\ngrep -n \"typedef struct\" **/*.h\n\n2. Collect Type Information\n\nFind definitions for all member types:\n\nNested structs\nEnum types\ntypedef aliases\nConstant definitions (e.g., #define EVP_MAX_MD_SIZE 64)\n3. Calculate Alignment Rules\nType\tSize (64-bit)\tAlignment Requirement\nchar/unsigned char\t1\t1\nshort\t2\t2\nint/uint32_t\t4\t4\nlong/size_t/pointer\t8\t8\nunsigned char[N]\tN\t1 (no padding needed)\nenum\tusually 4\t4\nstruct\tdepends on members\taligned to largest member\n\nKey Rules:\n\nMember offset must be a multiple of its size\nunsigned char arrays are 1-byte aligned, no padding required\nOverall struct size is aligned to the size of its largest member\nPadding bytes count toward offsets\n4. Output Offset Table\n\nUse hexadecimal representation for offsets, format:\n\n| Offset(0x) | Member | Type | Size |\n|------------|--------|------|------|\n| 0x00 | field1 | int | 4 |\n| 0x04 | *(padding)* | - | 4 |\n| 0x08 | field2 | void * | 8 |\n\nCommon Search Patterns\n# Find struct member definition\ngrep -n \"struct xxx_st\" **/*.h\n\n# Find type definition\ngrep -n \"typedef.*XXX\" **/*.h\n\n# Find constant definition\ngrep -n \"#define.*SIZE\" **/*.h\n\n# Find enum definition\ngrep -n \"typedef enum\" **/*.h\n\nExample: OpenSSL ssl_st Analysis\n\nAnalyzing client_app_traffic_secret member offset:\n\nLocate struct: ssl/ssl_local.h:1068\nFind constant: EVP_MAX_MD_SIZE = 64 (include/openssl/evp.h:19)\nCalculate layout, note that unsigned char arrays need no padding\nResult: offset 0x33c (828 bytes)\nNotes\nConfirm target platform (32-bit vs 64-bit)\nNote that conditional compilation (#ifdef) may affect struct layout\nCheck for #pragma pack directives that may change alignment\nUnion members share the same offset"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/LittleEnough/struct-offset-analyzer",
    "publisherUrl": "https://clawhub.ai/LittleEnough/struct-offset-analyzer",
    "owner": "LittleEnough",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/struct-offset-analyzer",
    "downloadUrl": "https://openagent3.xyz/downloads/struct-offset-analyzer",
    "agentUrl": "https://openagent3.xyz/skills/struct-offset-analyzer/agent",
    "manifestUrl": "https://openagent3.xyz/skills/struct-offset-analyzer/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/struct-offset-analyzer/agent.md"
  }
}